Avatar of ssblue
ssblue
Flag for United States of America asked on

Excel conditional formating based on a date, in a cell with a formula

I would like to format a cell based on a specific date - the cell has a formula in it.

Example: Cell R2 has a formula in it
I would like to have it turn 'red' if it is past '4/15/2017'
Microsoft OfficeMicrosoft ExcelSpreadsheets

Avatar of undefined
Last Comment
ssblue

8/22/2022 - Mon
Shums Faruk

Hi,

Use below formula:
=$R2>DATE(2017,4,15)

Open in new window

Conditional Formatting
ssblue

ASKER
there is no date in the cell  -  only a number which is a sum
Shums Faruk

You mentioned
I would like to have it turn 'red' if it is past '4/15/2017'

Can you post screenshot?
Your help has saved me hundreds of hours of internet surfing.
fblack61
ssblue

ASKER
Example

conditional formatting:  IF cell R2 is past 4/15/2017 then turn red.
Dates.PNG
...so for every cell I will have to create a separate condition using individual dates.
gowflow

please post this workbook as it is not conventional dates to find a workaround
gowflow
Shums Faruk

Also which rows and columns should be turned Red, if R2 is past 15?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Shums Faruk

What is the formula in Row 2?
ssblue

ASKER
... based on what I understand I will need individualized conditional formatting for each cell

R2 is just one example. I hope to be able to use the info for R2 to do the same for all the cell on Row 2.
Time-Keeping.xlsx
Shums Faruk

Do you mean like below:
Conditional Formatting
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ssblue

ASKER
YES!
ssblue

ASKER
...actually everything past today should be red.
Shums Faruk

Just add another Conditional formatting like below image beside your existing:
Conditional FormattingSee attached, I have changed values to check. You can turn back to original
ssblue_Time-Keeping.xlsx
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Shums Faruk

In Row 2 you don't have date, its just a Sum formula. On what row you want to determine past today?
ssblue

ASKER
Almost, I need it to be based on the date not a number because the number (sum) could be anything.
Shums Faruk

Please highlight those cells manually, which should turn Red comparing which cells.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ssblue

ASKER
I don't have a date to compare it to - I was hoping I could put the date as part of the conditional formula
ssblue

ASKER
AFK for a few hours.
Shums Faruk

As Row 2 is not in proper date format, shall I highlight Row 4 where your dates are like below image:
Conditional Formattingssblue_Time-Keeping_v1.xlsx
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ssblue

ASKER
I guess that would work. What I am trying to do is highlight in RED when a day is in the past. I guess I should have just said that in the beginning and let you tell me the best way to do it.
Shums Faruk

Just change below formula in Conditional Formatting:
=IF(LEFT(D4,2)>TEXT(TODAY(),"dd"),TRUE,FALSE)
to
=IF(LEFT(D4,2)<TEXT(TODAY(),"dd"),TRUE,FALSE)
ASKER CERTIFIED SOLUTION
Shums Faruk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ssblue

ASKER
That will work. Thanks!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23