Nested If Function - What's wrong?

dccat33

New Member
Joined
Nov 17, 2009
Messages
1
Can someone please tell me what's wrong with the format of the following nested if function:

=J6+L7+N7-O7-R7-S7-IF(U6=0&U7=0,0,IF(U6>=0&U7<=0,-(U6-U7),IF(U6<=0&U7>=0,U6-U7,IF(U6<0&U7<0&U6<U7,-(U6-U7),IF(U6<0&U7<0&U6>U7,U6-U7,IF(U6>0&U7>0&U6>U7,-(U6-U7),IF(U6>0&U7>0&U6<U7,U6-U7)))))))

Thanks!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I'm no expert but I think your problem is the way you are using the & in your IF statement. I think you have to go something like IF(AND(x, y),...)
 
Upvote 0
welcome to the board...

Here's what's TECHNICALLY wrong with it...
Each IF can only read 1 criteria
U6>=0&U7<=0
That's 2 criteria 1. U6 > =0&U7 2. 0&U7 < =0

That explains the error messages when you try to enter the formula...


Now, what's really wrong with it, hard to say.
Hard to make sense of what 0&U7 means...

When you use & to combine to #s together, the resulting value is TEXT not a Number. So comparing that using an = or < or > operator won't work, because it's TEXT, not a nubmer..


Can you explain in words what you are trying to accomplish? There is probably a much better way..
 
Upvote 0
Probably not all you need because I also got lost in your syntax, but I think this should get you started
Code:
=SUM(J6,L7,N7)-SUM(O7,R7,S7)-ABS(U6-U7)

lenze
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,561
Members
449,038
Latest member
Guest1337

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