Forum Discussion

Merk182's avatar
Merk182
Copper Contributor
Sep 07, 2021
Solved

Excel Formula Nesting IF AND Functions if more than one cell blank

I am putting a tracking sheet together. On the sheet I have project "Due Dates" and also possible "Extensions" to that due date. 

 

I think I'm ok calculating the time left -also OK with the conditional formatting, but I'd like to leave those cells with not data entered yet blank. 

 

I'm using   =IF(ISBLANK(E3),D3-TODAY(), E3-TODAY())

 

But - I'd like for the output to be left blank is there is no data input to either cell. 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you.... 

  • Merk182 

     

    Try:

    Just added an AND that states if both are blank, then return blank.

    =IF(AND(D5="",E5=""),"",IF(ISBLANK(E5),D5-TODAY(), E5-TODAY()))

     

4 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Merk182 

    You don't need a formula solution. Just copy the existing formula as far as column "Date Due" has dates.

    Best way is converting the list into a table. Every time you add new data all formulas and formatting will extend to the new row.

    And you can use MAX() instead of IF().

    =MAX(Table1[@[Date Due]:[Extemsion]])-TODAY()

     

  • DKoontz's avatar
    DKoontz
    Iron Contributor

    Merk182 

     

    Try:

    Just added an AND that states if both are blank, then return blank.

    =IF(AND(D5="",E5=""),"",IF(ISBLANK(E5),D5-TODAY(), E5-TODAY()))

     

    • Merk182's avatar
      Merk182
      Copper Contributor
      Thank you - worked perfectly. I thought I had to use AND - just my syntax was screwing up and it didn't work.

Resources