Cell color

P

Peter

I have one cell that is the date plus 1. What I need to do if the cell's date
is Sun or Mon then I want it to change the background to green. If it is Wed
or Thurs I want it to be blue. If it is a Tue. Fri or Sat I want it to be
white. I have tried many different formulas to change this and still can't
figure it out. Any help is appreciated.
 
M

Max

I have one cell that is the date plus 1
I'd assume that you have in A1 something like: =TODAY()+1
and that A1 has been applied a fill color of say, gray
(ie a fill color other than the default "white")

First, create 3 defined ranges via Insert>Name>Define :
Names Refers to
_1 ={1,7}
_2 ={3,4}
_3 ={2,5,6}

Then select A1, apply CF using Formula Is:
Condition 1: =ISNUMBER(MATCH(WEEKDAY(A1,2),_1,0))
Format green fill

Condition 2: =ISNUMBER(MATCH(WEEKDAY(A1,2),_2,0))
Format blue fill

Condition 3: =ISNUMBER(MATCH(WEEKDAY(A1,2),_3,0))
Format white fill

Ok out, and that should do it fine for what you seek.

You don't need to create defined range: _3 nor to apply condition 3 above if
it's just meant to be left unconditionally formatted with the default "white"
for days other than what's specified in conditions 1 or 2.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Cell coloring 3
Cell Colors 2
Conditional Formatting 6
vlookup help? 8
Payroll 2
Excel does not accept text format! 0
Change Color of cell 3
Dcounta 4

Top