Formula too long - help needed!

sadsfan

Board Regular
Joined
Apr 30, 2003
Messages
217
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi, I have written the formula, but Excel 2003 says it is too long, could anyone out there help me shorten it?

Code:
[FONT=Times New Roman][SIZE=3]=OR(AND(CG5=1,OR(AM5={19,21,23,25,27,29,31,33,35})),AND[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman](CG5=2,OR(AM5={25,27,29,31,33,35})),AND(CG5=3,OR(AM5=[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]{31,33,35})),AND(CG5=1,OR(AS5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(AS5={25,27,29,31,33,35})),AND(CG5=3,OR(AS5=
{31,33,35})),AND(CG5=1,OR(AV5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(AV5={25,27,29,31,33,35})),AND(CG5=3,OR(AV5=
{31,33,35})),AND(CG5=1,OR(AY5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(AY5={25,27,29,31,33,35})),AND(CG5=3,OR(AY5=
{31,33,35})),AND(CG5=1,OR(BE5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(BE5={25,27,29,31,33,35})),AND(CG5=3,OR(BE5=
{31,33,35})),AND(CG5=1,OR(BH5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(BH5={25,27,29,31,33,35})),AND(CG5=3,OR(BH5=
{31,33,35})),AND(CG5=1,OR(BK5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(BK5={25,27,29,31,33,35})),AND(CG5=3,OR(BK5=
{31,33,35})),AND(CG5=1,OR(BQ5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(BQ5={25,27,29,31,33,35})),AND(CG5=3,OR(BQ5=
{31,33,35})),AND(CG5=1,OR(BT5={19,21,23,25,27,29,31,33,35})),AND
(CG5=2,OR(BT5={25,27,29,31,33,35})),AND(CG5=3,OR(BT5=
{31,33,35})))[/FONT][/SIZE]

Hope that makes sense, I've pasted it as code, but it does go in the formula bar.

Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top