#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 349
Default Cell color

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Cell color

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 InsertNameDefine :
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
---
"Peter" wrote:
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Make text color match cell color with macro? JoeSpareBedroom Excel Discussion (Misc queries) 1 June 26th 07 07:09 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
Default Border, Font Color, and Cell Background Color Elijah Excel Discussion (Misc queries) 1 October 28th 05 04:10 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"