• 469K Members
• 4,696 Online
• 568K Conversations

New Contributor

# 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

# Re: Excel If or formula?

@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)`

# Re: Excel If or formula?

You may also CHOOSE this formula:
=CHOOSE((C3=“Major Overdue”)+1,
TODAY()-B3,
30)

# Re: Excel If or formula?

Thank you so much, can i add an or to this so if C3 is Major Overdue or Overdue to make it 30?

# Re: Excel If or formula?

@SPearson1973 , yes, sure, you may wrap both options with OR, alternatively use

`=IF( ISNUMBER(SEARCH("Overdue",C3)), 30, TODAY()-B3)`

Condition returns TRUE if the word Overdue will be within any text in C3.

Same with the other formulas above.

# Re: Excel If or formula?

OR, you may CHOOSE this formula:
=CHOOSE(OR(C3={“Major Overdue”,”Overdue”})+1,
TODAY()-B3,
30)
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies