Is it possible to use multiple isblank statments in an if statement. I want to use something like this sudocode
=if(isblank(g8)&isblank(h8), "both blank", "not both blank")
=if(isblank(g8&h8), "both blank", "not both blank")
These function return the $VALUE error or return the wrong text int the if statement.
Is there a way to do this?
Sometimes you need to check if a cell is blank, generally because you might not want a formula to display a result without input. In this case we're using IF with the ISBLANK function: =IF(ISBLANK(D2),"Blank","Not Blank")
The IF function allows you to make a logical comparison between a value and what you expect by testing for a condition and returning a result if True or False. So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False.
Another way to get an Excel IF to test multiple conditions is by using an array formula. To complete an array formula correctly, press the Ctrl + Shift + Enter keys together. In Excel 365 and Excel 2021, this also works as a regular formula due to support for dynamic arrays.
=if(AND(isblank(g8),isblank(h8)), "both blank", "not both blank")
If your ranges are contiguous, using the following formula will take as many arguments as you want, with a much easier syntax to type when you expand the range:
=if(counta(g8:h8)=0, "both blank", "not both blank")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With