gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 657
- Office Version
- 2019
- Platform
- Windows
Hello,
It's a nested IF statement(4). If its false then "".
In the formula bar, when I click it shows (logical test, value if true, value if false), but its the last IF that doesn't give (value if false).
'If B20 & W20 >0, If B20 & W20 <0, If B20 <0 and W20 >0, If B20>0 and W20 <0.
Just adjusting the formula for positive and negative numbers (B20, W20).
IF(AND(EXACT(A20,AA20),B20>0,W20>0),(W20-B20),""),IF(AND(EXACT(A20,AA20),B20<0,W20<0),(W20*-1)-(B20*-1),""),IF(AND(EXACT(A20,AA20),B20<0,W20>0),(W20-(B20*-1)),""),IF(AND(EXACT(A20,AA20),B20>0,W20<0),(W20*-1)-B20)),"")
Thank You
It's a nested IF statement(4). If its false then "".
In the formula bar, when I click it shows (logical test, value if true, value if false), but its the last IF that doesn't give (value if false).
'If B20 & W20 >0, If B20 & W20 <0, If B20 <0 and W20 >0, If B20>0 and W20 <0.
Just adjusting the formula for positive and negative numbers (B20, W20).
IF(AND(EXACT(A20,AA20),B20>0,W20>0),(W20-B20),""),IF(AND(EXACT(A20,AA20),B20<0,W20<0),(W20*-1)-(B20*-1),""),IF(AND(EXACT(A20,AA20),B20<0,W20>0),(W20-(B20*-1)),""),IF(AND(EXACT(A20,AA20),B20>0,W20<0),(W20*-1)-B20)),"")
Thank You