How NOT to show False in the following example.

Closed
Peter - Mar 11, 2023 at 06:34 PM
Herminaandrews Posts 4 Registration date Tuesday March 7, 2023 Status Member Last seen March 12, 2023 - Mar 12, 2023 at 10:13 AM

Hello, I wish the formula to return a blank cell if there a blank cells in the formula.

=IF(C27="BUY",((D30-D27)*10000),IF(C27="SELL",((D27-D30)*10000)))


Windows / Chrome 111.0.0.0

Related:

1 response

Herminaandrews Posts 4 Registration date Tuesday March 7, 2023 Status Member Last seen March 12, 2023 2
Mar 12, 2023 at 10:13 AM

Hello,

To return a blank cell if there are any blank cells in your formula, you can add an additional IF statement to check if any of the cells you're referencing are blank. Here's an example of what your formula could look like with this added check:

=IF(OR(C27="",D27="",D30=""),"",IF(C27="BUY",((D30-D27)*10000),IF(C27="SELL",((D27-D30)*10000))))

The OR statement checks if any of the cells C27, D27, or D30 are blank. If any of them are blank, the formula returns a blank cell. If none of them are blank, the original IF statement is executed to return the appropriate value based on the value in cell C27.

I hope this helps!

0