IF then statement for color corresponding to date

October 25, 2012 at 09:04:46
Specs: Windows XP
I am creating a tracker that has todays date in Row one corresponding to the days of the month in Row2

All the columns beneath contain an X. I would like the column beneath to turn yellow whenever todays date is equal to the day of the week in the same column. Can you help?


See More: IF then statement for color corresponding to date

Report •

#1
October 25, 2012 at 11:34:38
I think I know what you are trying to say, but I don't think you are saying it correctly.

When you say you have "todays date in Row one corresponding to the days of the month in Row2" do you mean that you have a series of dates in Row 1 and the names of the days in Row 2?

If you have "todays date in Row one" then all of the cells would have the same date.

I'm also a little confused by this statement:

"...whenever todays date is equal to the day of the week in the same column"

Dates can correspond to days, but they can't really be equal.

Are you simply asking for the column below the current date to be Yellow whenever the sheet is open? In other words, the column below 10/25/2012 will be yellow today, the column below 10/26/2012 will be yellow tomorrow, etc.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
October 25, 2012 at 12:14:27
Hello,

Thanks for your response . I already have it set up so that Row 1 is the current date i.e. today would read Thursday, October 25, 2012 and Row 2 has the 31 days in this month i.e. A2 = 10/1/12 and so on.

I have already set the formula for the corresponding date to highlight whenever the date changes.

Yes, to your question. Now I want the entire column beneath each date (like 10/1/12 in cell A2) to highlight the entire column beneath containing the X's as well whenever the date in that column matches today's date.


Report •

#3
October 25, 2012 at 13:22:22
OK, here's the disconnect:

You said: "I already have it set up so that Row 1 is the current date i.e. today would read Thursday, October 25, 2012."

I doubt that every cell in Row 1 contains today's date.

Do you mean that A1 has today's date? e.g. in A1 you have =TODAY()?

If that's the case, then try this:

Select all of the columns that contain your dates and use this Conditional Formatting Rule:

=AND(A$2=TODAY(),A1="X")

Choose a formatting color.

This will highlight any cell in the columns selected if it contains an X (or x) AND the cell in Row 2 of that Column contains today's date.

Note that this rule isn't using the date in A1 at all. It is only checking the dates in Row 2 to see if they match the value that would be returned by the TODAY() function. There's no need to compare the dates in Row 2 to A1 if it can be done within the Rule itself.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

Related Solutions

#4
October 31, 2012 at 00:13:28
Hey thanks for discussing. This information is useful ...
Thanks for sharing. :)

Report •

Ask Question