ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Statement that's conditional on multiple IF Stmts in other cell (https://www.excelbanter.com/excel-worksheet-functions/19368-if-statement-thats-conditional-multiple-if-stmts-other-cell.html)

Pat

IF Statement that's conditional on multiple IF Stmts in other cell
 
Hi all,

-I have an IF Stmt in Cell G97 that reads: =IF(M96=0,"",G96+1)
-M96 also has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,M95+K96-L96,"")
-L96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,$D$30,"")
-K96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,J96,"")
-J96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,$L$79*M95,"")
-G96 starts the whole process over [ =IF(M95=0,"",G95+1) ] and this process
repeats for about 40 rows.

My problem is that when any of the cells in Column M actually do =0, the
formula in Column G does not do what it is supposed to do. Instead of
leaving the cell blank, it does the "False" part, G96+1. Is this because I
have IF Stmts in Column G,H,I,J,K,L, and M? All of them work off each other.
All of my cells are formated to be "Number" cells with no decimal places.

But I still don't see why Excel isn't following my IF Stmt in Column G. One
person, Bob, suggested using "LEN" in my If Stmt, but that didn't do the
trick unfortunately. Any suggestions? I am lost! Any and all help is
appreciated.

Thanks, have a great weekend!
-Pat

JE McGimpsey

It's probably not a direct consequence of the IF()s , but if there are
small rounding errors, perhaps M96 is not actually zero.

Try:

=IF(ROUND(M96,10)=0, "",G96+1

adjust the number of digits to suit.

In article ,
Pat wrote:

Hi all,

-I have an IF Stmt in Cell G97 that reads: =IF(M96=0,"",G96+1)
-M96 also has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,M95+K96-L96,"")
-L96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,$D$30,"")
-K96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,J96,"")
-J96 has an IF Stmt that reads: =IF(G96<=$D$31*$D$32,$L$79*M95,"")
-G96 starts the whole process over [ =IF(M95=0,"",G95+1) ] and this process
repeats for about 40 rows.

My problem is that when any of the cells in Column M actually do =0, the
formula in Column G does not do what it is supposed to do. Instead of
leaving the cell blank, it does the "False" part, G96+1. Is this because I
have IF Stmts in Column G,H,I,J,K,L, and M? All of them work off each other.
All of my cells are formated to be "Number" cells with no decimal places.

But I still don't see why Excel isn't following my IF Stmt in Column G. One
person, Bob, suggested using "LEN" in my If Stmt, but that didn't do the
trick unfortunately. Any suggestions? I am lost! Any and all help is
appreciated.

Thanks, have a great weekend!
-Pat



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com