Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 590
Default WEEKDAY in Conditional Formatting?

Excel2003 ... My Cols are A thru H =

Date - Mon - Tue - Wed - Thu - Fri - Sat - Sun

Cell A2 = a date (or is blank (empty)) ... format = mm/dd/yy
Cells B2 thru H2 contain Conditional Formatting as follows:

Cell B2 ... =if(weekday(A2,2)=1
Cell C2 ... =if(weekday(A2,2)=2
Cell D2 ... =if(weekday(A2,2)=3
Cell E2 ... =if(weekday(A2,2)=4
Cell F2 ... =if(weekday(A2,2)=5
Cell G2 ... =if(weekday(A2,2)=6 ... this one is a problem???
Cell H2 ... =if(weekday(A2,2)=7

All above are working ok, except ... =if(weekday(A2,2)=6 ... this formula in
Conditional Formatting is setting off the Conditional formatting when Col A
reference cell is BLANK (empty) ... Anyone know what gives?

Note: if I place "=6" in any of the other Cells it also sets off the
Conditional formatting when Col A reference cell is BLANK (empty)???

Thanks ... Kha


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default WEEKDAY in Conditional Formatting?

That is because a blank gets evaluated as day 0, which weekday sees as a
Saturday.

Try

=if(and(a2<"",weekday(A2,2)=6),

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ken" wrote in message
...
Excel2003 ... My Cols are A thru H =

Date - Mon - Tue - Wed - Thu - Fri - Sat - Sun

Cell A2 = a date (or is blank (empty)) ... format = mm/dd/yy
Cells B2 thru H2 contain Conditional Formatting as follows:

Cell B2 ... =if(weekday(A2,2)=1
Cell C2 ... =if(weekday(A2,2)=2
Cell D2 ... =if(weekday(A2,2)=3
Cell E2 ... =if(weekday(A2,2)=4
Cell F2 ... =if(weekday(A2,2)=5
Cell G2 ... =if(weekday(A2,2)=6 ... this one is a problem???
Cell H2 ... =if(weekday(A2,2)=7

All above are working ok, except ... =if(weekday(A2,2)=6 ... this formula

in
Conditional Formatting is setting off the Conditional formatting when Col

A
reference cell is BLANK (empty) ... Anyone know what gives?

Note: if I place "=6" in any of the other Cells it also sets off the
Conditional formatting when Col A reference cell is BLANK (empty)???

Thanks ... Kha




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default WEEKDAY in Conditional Formatting?

=AND(A2<"",WEEKDAY(A2,2)=6)


"Ken" wrote:

Excel2003 ... My Cols are A thru H =

Date - Mon - Tue - Wed - Thu - Fri - Sat - Sun

Cell A2 = a date (or is blank (empty)) ... format = mm/dd/yy
Cells B2 thru H2 contain Conditional Formatting as follows:

Cell B2 ... =if(weekday(A2,2)=1
Cell C2 ... =if(weekday(A2,2)=2
Cell D2 ... =if(weekday(A2,2)=3
Cell E2 ... =if(weekday(A2,2)=4
Cell F2 ... =if(weekday(A2,2)=5
Cell G2 ... =if(weekday(A2,2)=6 ... this one is a problem???
Cell H2 ... =if(weekday(A2,2)=7

All above are working ok, except ... =if(weekday(A2,2)=6 ... this formula in
Conditional Formatting is setting off the Conditional formatting when Col A
reference cell is BLANK (empty) ... Anyone know what gives?

Note: if I place "=6" in any of the other Cells it also sets off the
Conditional formatting when Col A reference cell is BLANK (empty)???

Thanks ... Kha


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 590
Default WEEKDAY in Conditional Formatting?

Another "nail" in the coffin ... Thank you both ... Kha


"Teethless mama" wrote:

=AND(A2<"",WEEKDAY(A2,2)=6)


"Ken" wrote:

Excel2003 ... My Cols are A thru H =

Date - Mon - Tue - Wed - Thu - Fri - Sat - Sun

Cell A2 = a date (or is blank (empty)) ... format = mm/dd/yy
Cells B2 thru H2 contain Conditional Formatting as follows:

Cell B2 ... =if(weekday(A2,2)=1
Cell C2 ... =if(weekday(A2,2)=2
Cell D2 ... =if(weekday(A2,2)=3
Cell E2 ... =if(weekday(A2,2)=4
Cell F2 ... =if(weekday(A2,2)=5
Cell G2 ... =if(weekday(A2,2)=6 ... this one is a problem???
Cell H2 ... =if(weekday(A2,2)=7

All above are working ok, except ... =if(weekday(A2,2)=6 ... this formula in
Conditional Formatting is setting off the Conditional formatting when Col A
reference cell is BLANK (empty) ... Anyone know what gives?

Note: if I place "=6" in any of the other Cells it also sets off the
Conditional formatting when Col A reference cell is BLANK (empty)???

Thanks ... Kha


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
conditional formatting glitches Kat Excel Discussion (Misc queries) 2 May 26th 06 08:16 PM
Keeping conditional formatting when sorting Andrea A Excel Discussion (Misc queries) 0 April 4th 06 03:00 PM
conditional formatting Rich Excel Discussion (Misc queries) 2 April 1st 06 10:27 AM
Conditional Formatting Ant Excel Worksheet Functions 4 December 8th 05 08:44 PM
cannot use ISEVEN or ISODD functions in Conditional Formatting Scott Paine Excel Worksheet Functions 6 December 6th 05 09:44 PM


All times are GMT +1. The time now is 02:37 PM.

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

About Us

"It's about Microsoft Excel"