What IF formula help

Copper Contributor

Good afternoon,

 

I am trying to set up a formula that calculates a date based on a cells value.

 

For Example:

 

Name        Date Reviewed     Rating           Date of Next Review         

J. Smith      April 15 2019         Good         (6 months from april 15 2019)

P. Smith     April 15 2019          Poor          (3 months from april 15 2019)

S. Smith     April 15 2019          New          (3 months from april 15 2019)

 

I would like to set up a formula that based on a "Good", "Poor", or "New" value, it generates a date that is either 3 months from the previous date or 6 months from the previous date.

 

Is this possible?

 

 

10 Replies

@Vanessa_Aceti , that could be like

=EOMONTH(B2,IF(C2="Good",6,3))

 

@Sergei Baklan

I'd like the generated date to be based on a result in the "Rating" column. Not the previous date. The previous date is a starting point for the generated future date.

Hope that makes sense.

@Vanessa_Aceti ,

 

What the formula do it takes previous date and adds to it 6 months if the rating is Good or 3 month otherwise. What do you mean under "Not the previous date" - we add months to TODAY or what?

The formula in D2, copied down rows, is:
=EDATE(B2,
(C2="Good")*3+3)
The phrase “from the previous date” denotes that EDATE should be used instead of EOMONTH, which indicates “from the end of the month wherein the previous date pertains”.

@Twifoo , sure, that shall be EDATE and sorry for the misprint

It is now manifest that we intended to suggest the same formula. I just avoided IF by using Boolean logic, which I noticed was your favorite. Incidentally, you might have unwittingly resorted to the plain IF, rather than the cryptic Boolean logic.

@Twifoo , yes, I personally prefer * and + instead of AND and OR, but I don't push other people to do the same - depends on situation.

We share the same preference to Boolean logic, although it may seem cryptic to the uninitiated. I always use it, regardless of the preference of others, but I must admit that I sometimes inadvertently use the instantly conceivable IF, AND, and OR.

That's the same story as to use only shortcuts or only mouse; use tables or avoid tables; use VLOOKUP or INDEX/MATCH, etc. Doesn't matter, all works. Depends on personality and concrete situations.