# Nested IF w/ False

#### gtd526

##### Active Member
Hello,
Im trying to get rid of the False statement from the formula. I think its because of the EXACT statement, if they are great, if not, FALSE? One of the nested IFs has to be true.
Can use 1 Exact up front instead of for every IF?
The Nested IF's are due to (+) and (-) numbers.
thanks.

NBA.xlsm
V
5FALSE
613.7
Favs
Cell Formulas
RangeFormula
V5:V6V5=IF(EXACT(A5,AA5),IF(AND(B5>0,O5>0),O5-B5,IF(EXACT(A5,AA5),IF(AND(B5<0,O5<0),ABS(O5)-ABS(B5),IF(EXACT(A5,AA5),IF(AND(B5<0,O5>0),O5+ABS(B5),IF(EXACT(A5,AA5),IF(AND(B5>0,O5<0),ABS(O5)+B5,""))))))))

### Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

#### jasonb75

##### Well-known Member
Can use 1 Exact up front instead of for every IF?
You only need one, it is probably the repetition that is causing the problem.
Excel Formula:
``=IF(EXACT(A5,AA5),IF(AND(B5>0,O5>0),O5-B5,IF(AND(B5<0,O5<0),ABS(O5)-ABS(B5),IF(AND(B5<0,O5>0),O5+ABS(B5),IF(AND(B5>0,O5<0),ABS(O5)+B5,"")))),"")``

#### gtd526

##### Active Member
You only need one, it is probably the repetition that is causing the problem.
Excel Formula:
``=IF(EXACT(A5,AA5),IF(AND(B5>0,O5>0),O5-B5,IF(AND(B5<0,O5<0),ABS(O5)-ABS(B5),IF(AND(B5<0,O5>0),O5+ABS(B5),IF(AND(B5>0,O5<0),ABS(O5)+B5,"")))),"")``
Perfect. Thank you.

#### jasonb75

##### Well-known Member
You're welcome As far as I can see, you can use a much shorter formula, checking if each value is < or > than 0 then making them absolute is not necessary, it can all be done in one step. I've done a quick test with 4 pairs of values (1 pair for each of the criteria in your formula) and the results for this method are the same.
Excel Formula:
``=IF(AND(EXACT(A5,AA5),B5<>0,O5<>0),ABS(O5-B5),"")``
If you don't need to eliminate possible zero values / empty cells then you could shorten it even more
Excel Formula:
``=IF(EXACT(A5,AA5),ABS(O5-B5),"")``

Replies
4
Views
193
Replies
7
Views
315
Replies
4
Views
140
Replies
13
Views
436
Replies
0
Views
73

### Forum statistics

1,144,616
Messages
5,725,325
Members
422,614
Latest member
nicklasx ### 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.

### Which adblocker are you using?    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

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