samsilverman
Board Regular
- Joined
- Nov 9, 2009
- Messages
- 176
I need my spreadsheet to return a true or false ("" or *) based whether one AND statement exists OR another AND statement exists. It really all hinges on whether cell M17 is blank or has a value placed in it. Here's my current formula that is not working. Any help is greatly appreciated.
I've color coded the two different AND statements I need excel to consider. The only difference between the BLACK and RED is whether there is a value for cell M17.
Right now, if I leave M17 blank it returns a false (*). But, I only need it to consider cell M17 if there is a value placed there. If M17 is blank, but L17 falls within the parameters, I need the formula to ignore M17 and return a true ("").
=IF(AND($I8="AIRBORNE INFECTION ISOLATION - 6",L17<=-0.001,M17<=-0.001,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 12",L17<=-0.01,M17<=-0.01,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="PROTECTIVE ENVIRONMENT",L17>=0.01,M17>=0.01,(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(NEG) AII - IMMUNE COMPROMISED",L17<=-0.01,M17<=-0.01,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(POS) AII - IMMUNE COMPROMISED",L17>=0.01,M17>=0.01,(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 6",L17<=-0.001,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 12",L17<=-0.01,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="PROTECTIVE ENVIRONMENT",L17>=0.01,M17=" ",(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(NEG) AII - IMMUNE COMPROMISED",L17<=-0.01,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(POS) AII - IMMUNE COMPROMISED",L17>=0.01,M17=" ",(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ","*")))))))))))
I've color coded the two different AND statements I need excel to consider. The only difference between the BLACK and RED is whether there is a value for cell M17.
Right now, if I leave M17 blank it returns a false (*). But, I only need it to consider cell M17 if there is a value placed there. If M17 is blank, but L17 falls within the parameters, I need the formula to ignore M17 and return a true ("").
=IF(AND($I8="AIRBORNE INFECTION ISOLATION - 6",L17<=-0.001,M17<=-0.001,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 12",L17<=-0.01,M17<=-0.01,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="PROTECTIVE ENVIRONMENT",L17>=0.01,M17>=0.01,(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(NEG) AII - IMMUNE COMPROMISED",L17<=-0.01,M17<=-0.01,(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(POS) AII - IMMUNE COMPROMISED",L17>=0.01,M17>=0.01,(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 6",L17<=-0.001,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="AIRBORNE INFECTION ISOLATION - 12",L17<=-0.01,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="PROTECTIVE ENVIRONMENT",L17>=0.01,M17=" ",(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(NEG) AII - IMMUNE COMPROMISED",L17<=-0.01,M17=" ",(F17+G17+F18+G18)<((I17+J17+I18+J18)*-1))," ",IF(AND($I8="(POS) AII - IMMUNE COMPROMISED",L17>=0.01,M17=" ",(F17+G17+F18+G18)>((I17+J17+I18+J18)*-1))," ","*")))))))))))