Nested If Formula Help

ffi77

New Member
Joined
Jan 22, 2010
Messages
12
Hi,

I am trying to enter the following formula however I know it has to many Nested Ifs but can't figure out a way round it:

=IF(OR(GS3="Y",P3=0),0,IF(AND(AC3<AB3,AJ3<AG3*1.5),0,IF(CV3>CU3,CV3,
IF(CU3>CT3,CU3,IF(CT3>CS3,CT3,IF(CS3>CR3,CS3,IF(CR3>CQ3,CR3,
IF(CQ3>CP3,CQ3,IF(CP3>CO3,CP3,IF(CO3>CN3,CO3,IF(CN3>CM3,CN3,
IF(CM3>CL3,CM3,IF(CL3>0,CL3,0))))))

I've tried to amend it by doing &IF but think I've went way off course with that. Can anyone point me in the right direction?

Many Thanks
Fraser
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Is it something like

=IF(OR(GS3="Y",P3=0),0, MAX(CL3:CU3))
 
Upvote 0
Actually it isn't MAX the way you have written your formula. For example if CL3:CV3 contained:

8,7,6,5,4,3,2,5,4,3,2

your formula would have returned 5, being the first value that is greater than the value to the left working backwards. The maximum value is 8. If no cell was greater than the cell to the left as in:

10,9,8,7,6,5,4,3,2,1,0

the value in CL3 would be returned provided that it was greater than zero, otherwise zero would be returned.

If you still want that you can use this as the last part of your formula:

=IF(ISNA(LOOKUP(2,1/(CL3:CU3<=CM3:CV3),CM3:CV3)),MAX(0,CL3),LOOKUP(2,1/(CL3:CU3<=CM3:CV3),CM3:CV3))
 
Upvote 0

Forum statistics

Threads
1,215,401
Messages
6,124,705
Members
449,182
Latest member
mrlanc20

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