Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default conditional formatting question

is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth function for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't know if
this is possible with this set up.

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default conditional formatting question

Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may wish to
study.

I set three conditional formats, the first to pick out today, the second to
pick out days that are not in this month (such as the 30 in Feb) so that it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and A4,A5 is
simply 1,2, etc. then use these three conditions. It is important to get the
order right for them all to show. I show the formula assuming B4 is the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth function

for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't know if
this is possible with this set up.

--


Gary





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default conditional formatting question

=WEEKDAY(DATE(YEAR(B$3),MONTH(B$3),DAY($A4)),3)

Apply the above to each cell in the matrix and then set conditional
formatting to cells where cell value is =5; as a weekend

Note: Excel will allow invalid date e.g. 31 Apr by computing the day as 1
May - the correct day number is returned.

--
Cheers
Nigel



"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth function

for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't know if
this is possible with this set up.

--


Gary





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default conditional formatting question

thanks, bob, works great. i just used the last 2 rules because i wasn't
concerned with highlighting the current day. i used that 3rd rule to
complete the border grid for all of the cells.

thanks again

--


Gary


"Bob Phillips" wrote in message
...
Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may wish to
study.

I set three conditional formats, the first to pick out today, the second
to
pick out days that are not in this month (such as the 30 in Feb) so that
it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and A4,A5
is
simply 1,2, etc. then use these three conditions. It is important to get
the
order right for them all to show. I show the formula assuming B4 is the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth function

for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't know
if
this is possible with this set up.

--


Gary







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default conditional formatting question

Can't you include the borders in the other bits?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
thanks, bob, works great. i just used the last 2 rules because i wasn't
concerned with highlighting the current day. i used that 3rd rule to
complete the border grid for all of the cells.

thanks again

--


Gary


"Bob Phillips" wrote in message
...
Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may wish

to
study.

I set three conditional formats, the first to pick out today, the second
to
pick out days that are not in this month (such as the 30 in Feb) so that
it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and

A4,A5
is
simply 1,2, etc. then use these three conditions. It is important to get
the
order right for them all to show. I show the formula assuming B4 is the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth function

for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't know
if
this is possible with this set up.

--


Gary











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default conditional formatting question

i did, but the weekdays had no border, only the weekends.

--


Gary


"Bob Phillips" wrote in message
...
Can't you include the borders in the other bits?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
thanks, bob, works great. i just used the last 2 rules because i wasn't
concerned with highlighting the current day. i used that 3rd rule to
complete the border grid for all of the cells.

thanks again

--


Gary


"Bob Phillips" wrote in message
...
Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may wish

to
study.

I set three conditional formats, the first to pick out today, the
second
to
pick out days that are not in this month (such as the 30 in Feb) so
that
it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and

A4,A5
is
simply 1,2, etc. then use these three conditions. It is important to
get
the
order right for them all to show. I show the formula assuming B4 is the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth
function
for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't
know
if
this is possible with this set up.

--


Gary











  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default conditional formatting question

Gary,

Put borders round everything by default, then set the ones that meet a
condition with conditional NO borders.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i did, but the weekdays had no border, only the weekends.

--


Gary


"Bob Phillips" wrote in message
...
Can't you include the borders in the other bits?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
thanks, bob, works great. i just used the last 2 rules because i wasn't
concerned with highlighting the current day. i used that 3rd rule to
complete the border grid for all of the cells.

thanks again

--


Gary


"Bob Phillips" wrote in message
...
Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may

wish
to
study.

I set three conditional formats, the first to pick out today, the
second
to
pick out days that are not in this month (such as the 30 in Feb) so
that
it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and

A4,A5
is
simply 1,2, etc. then use these three conditions. It is important to
get
the
order right for them all to show. I show the formula assuming B4 is

the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth
function
for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't
know
if
this is possible with this set up.

--


Gary













  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default conditional formatting question

i just used the formula in the 3rd rule
=MOD(ROW(),1)=0
works fine.

i also added a cross-hatch pattern to rule 1 to show the non-existent dates
in the months with less that 31 days
--


Gary


"Bob Phillips" wrote in message
...
Gary,

Put borders round everything by default, then set the ones that meet a
condition with conditional NO borders.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i did, but the weekdays had no border, only the weekends.

--


Gary


"Bob Phillips" wrote in message
...
Can't you include the borders in the other bits?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
thanks, bob, works great. i just used the last 2 rules because i
wasn't
concerned with highlighting the current day. i used that 3rd rule to
complete the border grid for all of the cells.

thanks again

--


Gary


"Bob Phillips" wrote in message
...
Gary,

I do something very similar at
http://www.xldynamic.com/source/xld.CF.html#calendar which you may

wish
to
study.

I set three conditional formats, the first to pick out today, the
second
to
pick out days that are not in this month (such as the 30 in Feb) so
that
it
does mis-lead, and weekends.

Assuming that the dates in B3,C3, etc are all 1st day of month, and
A4,A5
is
simply 1,2, etc. then use these three conditions. It is important to
get
the
order right for them all to show. I show the formula assuming B4 is

the
activecell in the selection

#1 - highlight today
Formula - =B$3+$A4-1=TODAY()
Set a pattern colour
I also set the font to Bold, White for emphasis

#2 - highlight days not in month
Formula - =MONTH(B$3+$A4-1)<MONTH(B$3)
Set the font colour to white so that any test in the cell gets
hidden

#3 - highlight weekends
Formula - =WEEKDAY(B$3+$A4-1,2)5
Set the pattern colour, I use a pastel colour to be easy on the eye

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
is this possible in my scenario?

this is a date table
column headings for each month, b3 has 1/1/2006, using eomonth
function
for
the rest of the months and headings formatted MMM .

in column A, i just have integers, 1 through 31.

is it possible to format cells based on weekends?

i have done it for individual months on separate sheets, but don't
know
if
this is possible with this set up.

--


Gary















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 Question Emece Excel Discussion (Misc queries) 1 January 20th 09 07:48 PM
Conditional Formatting Question whwar_9739 Excel Discussion (Misc queries) 2 October 31st 08 10:03 PM
Conditional Formatting Question Matt Excel Discussion (Misc queries) 3 October 3rd 07 07:07 PM
Conditional formatting question [email protected] Excel Worksheet Functions 5 September 25th 07 06:17 PM
conditional formatting question chris Excel Worksheet Functions 2 January 5th 05 03:51 PM


All times are GMT +1. The time now is 07:12 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"