Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

how to change cell color based on complex conditions?

  Asked By: Joel    Date: Sep 04    Category: MS Office    Views: 609
  

If I have 31 cells and want the individual cells to change colors depending on
today's date (DD), how could I do that?

A1 would change from background color White to Yellow only on Jan 1, Feb 1,
Mar1...Dec 1.
B1 would change from background color White to Yellow only on Jan 2, Feb 2,
Mar2...Dec 2.
A22 would change from background color White to Yellow only on Jan 3, Feb 3,
Mar 3...Dec 3.
C17 would change from background color White to Yellow only on Jan 4, Feb 4,
Mar 4...Dec 4.

....etc.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Salvatore Kelly     Answered On: Sep 04

I'm not sure where you are going with A1,B1,A22,C17,but in these cells  you
can put a conditional formatting based  on the formula =DAY(TODAY())

So for A1 check if the formula is equal to 1 and then set the colour to
yellow.

For B1 check if the formula is equal to 2 ..

 
Answer #2    Answered By: Deloris Harris     Answered On: Sep 04

To elaborate , check out "Conditional Formatting" in
Excel Help. It's on the Format menu.



In your case, you'd go to cell  A1, hit Format/Conditional Formatting.,
select "Formula Is" (instead of "Cell Is") and enter =DAY(TODAY())=1, select
Format, go to the Patterns tab, and select Yellow as the background  color,
hit OK and OK.



Then go to B1, and do the same thing with "Formula Is" set to
=DAY(TODAY())=2, with Yellow pattern.

Go to A22, and do the same thing with "Formula Is" set to =DAY(TODAY())=3,
with Yellow pattern.

And go to C17, and do the same thing with "Formula Is" set to
=DAY(TODAY())=4, with Yellow pattern.

Etc.



Does this make sense? Pretty cool feature.

 
Didn't find what you were looking for? Find more on how to change cell color based on complex conditions? Or get search suggestion and latest updates.




Tagged: