If statement of DOOM

Whitepaws

New Member
Joined
Jan 3, 2008
Messages
7
I have been working on this statement all day today and have finally hit a wall. I think I need to change around where my ( and ) are when I go to add the final statement. It occurs to me I might have hit the maximum nests but its hard to tell at this point.

Excel allows this statement
=IF(C12>0,IF(C8>C7,0,(IF(((C9+C8+C12)-C6)>0,(IF(C12>C6,C9,(IF(C13>C7,((C9+C8+C12+C13)-C6),IF((C8+C9+C12+C13)>C6,((C8+C9+C12+C13)-C6),((C9+C8+C12+C9)-C6)))))),IF((C8+C12+C13)-C6>0,((C8+C9+C13+C12)-C6),0)))),IF((C9+C8)-C6>0,IF(C8>C7,0,(IF(((C9+C8+C12)-C6)>0,(IF(C12>C6,C9,(IF(C13>C7,((C9+C8+C12+C13)-C6),(IF((C8+C9+C12+C13)>C6,IF(C13>0,((C9+C8+C13)-C6),(C6-C9)),(C9+C13)))))))))),IF(C13>0,IF((C9+C8+C12+C13)-C6>0,(C8+C9+C12+C13)-C6,0),0)))

But I am getting the wrong results at the portion in red so I went to substitute (C9+C13) with (IF((C9-C6)>0,C9,(C6-C9)))

I keep getting an error that I am typing the equation incorrectly

Any help would be appreciated
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Wow! long formula...What are you trying to do? Maybe that way we can work out better instead of looking at the formula..:)
 
Upvote 0
It part of a ridiculously complicated work sheet to make a series of 4 bars stack on each other and show carry over in the right category when it goes above a specific level

The max level is C6
The initial value to be compared C6 is C7
However if you have values in C8, C13 and C12 that will replace a portion of C7 or more than C7.

If the values are above C6 then the portion contributed by each cell needs to be carried over.

I am finding that I need to have a statement for any combination of possibilities that might be over C7
 
Upvote 0
Excel gives you hundreds of columns so I'd suggest that you to use some of them instead of trying to manage an unnecessarily complicated formula like that.

There's rarely any real need to attempt to cram that much logic into a single cell.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

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