Search code examples
excelif-statementformula

IF and or Formula in Excel 2019


=IF(OR(Database!M4="male",Database!M4="female"),Database!MB4,"")

The Result shows me zero (0) I want to, if the cell has no data the result should be blank (empty) not zero. thanks in advance dear friends


Solution

  • Use ISBLANK to check if a cell is blank.

    =IF(OR(Database!M4="male",Database!M4="female"),IF(ISBLANK(Database!MB4), "", Database!MB4),"")