SOLVED

HELP required with formula or conditional formatting....

Copper Contributor

Hi all, hoping that i can get some good advice and hopefully an answer to my problem.

 

I have a spreadsheet, picture attached, I already have a few formula and conditional formatting rules applied.

I would like to change 'column I' to one of 3 values, based on the date values in columns D and E. 

If both dates have passed, then D&E auto change to green, Todays date stays white, dates in the future are yellow, and TBC (to be confirmed) are red.

In Column I, these are reflected by "complete", "Pending" and "incomplete". I have to manually change these at the moment (using the data validation list). 

My question is, is there a way to change the status in column I automatically, based on the values in columns D and E.

So far I have avoided any macros, which am hoping to avoid with this also.

 

Any help would be very much appreciated.

SP8Y8_1-1618235346780.png

 

 

 

9 Replies

@SP8Y8 

You haven't specified under which conditions the status should be N/A or Cancelled. Here is a first attempt. It will probably have to be modified/expanded. In I7:

 

=IF(OR(D7="TBC",E7="TBC"),"Incomplete",IF(OR(D7>TODAY(),E7>TODAY()),"Pending","Complete"))

 

Fill down.

@Hans Vogelaar Hi Hans,
I tried that formula and unfortunately the value changed in I7 to "Complete" every time, despite the value entered in D and E.
In the I column, there has to be a rule order,

1. if either cell in the D and E columns has a "TBC" then the I cell should be "incomplete",
2. if either of the D and E columns has a date in the future (yellow) then the I cell should read "Pending"
3. Only if both D and E are dates that have passed or todays date then I cell should read "Complete"

I have attached a copy of the work sheet to see if that is of any help to you.

 

Regards

best response confirmed by SP8Y8 (Copper Contributor)
Solution

@SP8Y8 

In your screenshot, the data began in row 7. In your workbook, they begin in row 4, so the formula has to be adjusted accordingly. In the following formula for I4, I also took empty cells into account:

 

=IF(AND(D4="",E4=""),"",IF(OR(D4="TBC",E4="TBC"),"Incomplete",IF(OR(D4>TODAY(),E4>TODAY()),"Pending","Complete")))

apologies, for the confusion there, I have now applied this and it works! Thanks you so much for your help Hans.

@Hans Vogelaar Slight issue that I did not foresee, I will need the following added to the formula,

If D or E column have PAO or N/A in it, then column I should read complete or incomplete based on the date in the other column..... As per attachment.......Help again please?

@SP8Y8 

Here is a new version:

 

=IF(AND(D4="",E4=""),"",IF(OR(D4="TBC",E4="TBC"),"INCOMPLETE",IF(OR(D4={"N/A","PAO"},E4={"N/A","PAO"}),IF(MAX(D4:E4)>TODAY(),"COMPLETE","INCOMPLETE"),IF(MAX(D4:E4)>TODAY(),"PENDING","COMPLETE"))))

@Hans Vogelaar 

Good morning, I have encountered a problem with the latest version you very kindly constructed for me.

PAO and N/A gave incorrect values in the status column.

I have updated the sheet and added a few comments in the hope this may be of benefit if you can still assist me.

 

Kind regards.

 

 

@SP8Y8 

Sorry, I switched a condition.

 

=IF(AND(D4="",E4=""),"",IF(OR(D4="TBC",E4="TBC"),"INCOMPLETE",IF(OR(E4={"N/A","PAO"}),IF(D4>TODAY(),"INCOMPLETE","COMPLETE"),IF(MAX(D4:E4)>TODAY(),"PENDING","COMPLETE"))))

 

If I8 and I10 should be pending, contradicting your earlier description:

 

=IF(AND(D4="",E4=""),"",IF(OR(D4="TBC",E4="TBC"),"INCOMPLETE",IF(OR(E4={"N/A","PAO"}),IF(D4>TODAY(),"PENDING","COMPLETE"),IF(MAX(D4:E4)>TODAY(),"PENDING","COMPLETE"))))

@Hans Vogelaar absolutely brilliant!  This works perfectly. Thanks you very much for all your time and help. Very much appreciated.

 

Colin.

1 best response

Accepted Solutions
best response confirmed by SP8Y8 (Copper Contributor)
Solution

@SP8Y8 

In your screenshot, the data began in row 7. In your workbook, they begin in row 4, so the formula has to be adjusted accordingly. In the following formula for I4, I also took empty cells into account:

 

=IF(AND(D4="",E4=""),"",IF(OR(D4="TBC",E4="TBC"),"Incomplete",IF(OR(D4>TODAY(),E4>TODAY()),"Pending","Complete")))

View solution in original post