Forum Discussion

SPearson1973's avatar
SPearson1973
Copper Contributor
Jun 04, 2019

Excel If or formula?

I have a formula which looks at a date in column B and returns how many days from that date - thi s formula is  =Today()-B3, I have another column with Text which states Major Overdue or other text.  I would like to change my formula that is =Today()-B3 so that it looks at the B column and at the text column.  I would like it to return the number of days since the date in B column as it currently does, unless it states Major Overdue in the text column, in which case it would put in 30 - is this possible and does this make sense

5 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    You may also CHOOSE this formula:
    =CHOOSE((C3=“Major Overdue”)+1,
    TODAY()-B3,
    30)
  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    SPearson1973 , if your text is in C3 that could be

    =(30-TODAY()+B3)*(C3="Major Overdue")+TODAY()-B3

    or

    =IF(C3="Major Overdue",30,TODAY()-B3)

     

      • Twifoo's avatar
        Twifoo
        Silver Contributor
        OR, you may CHOOSE this formula:
        =CHOOSE(OR(C3={“Major Overdue”,”Overdue”})+1,
        TODAY()-B3,
        30)

Resources