Help with IF Conditional formatting

New Contributor

Hi I am not an excel expert so pardon if my question sounds confusing. I am trying to set multiple conditions using free text as validation and want to build a formula to calculate. Here is what I did. 


=IF(AND(M11>="RfR"),"=(D5+60)",IF(AND(M11>="PSJO"),"=(D5+120)",IF(AND(M11="TJO"),"=(D5+45)", " ")))

Result I got as per data in column M is as follows: 




However, what I want is for excel to calculate the date by adding 60 or 120 or 45 to the date in column D, instead of showing the formula. Please advise where I am going wrong. Column D contains Dates for e.g: 10/16/2022 and Column M contains text from drop down list, e.g RfR or PSJO or TJO 

2 Replies
best response confirmed by Hans Vogelaar (MVP)


Keeping the same logic as what you stated with, try this:

=IF(M11>="TJO",D5+45,IF(M11>="RfR",D5+60,IF(M11>="PJSO",D5+120, "")))


No need for the AND bits and you need the check the texts in descending alphabetical order.


Edit: And no need for the quotation marks and the = sign where you want to perform a calculation as it just creates a text like =D5+60 as you discovered.

Hi @Riny_van_Eekelen, thanks for the swift and BRILLIANT response! Yes, Yes, Yes! It worked! Ha! We live and learn from each other! This was my first experience reaching out on a forum like this with a question and my experience has been SUPER! Many thanks again!!!