Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Conditional formatting and weekdays

Hi,
Need some help for the captioned subject.
I am entering a date on the top cell of col B

Then there are numbers from 1 to 31 from cell B5 downwards.
These numbers represent the day of the month.

I want to highlight the cells that are having sundays with
one colour and those out of month with another colour.

Is it possible?
Thanks,
Jagruti.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional formatting and weekdays

Hi Jagruti,

Do the following. Select the first cell which contains 1 i.e. B5. Go to
Format Conditional Formatting. Select formula is and enter the
following formula in the adjoining box:
=WEEKDAY(DATE(YEAR($B$1),MONTH($B$1),B5))=1
select a format color for the cell. This will format all cells which are
sundays to your conditional format color. As for the other cells, you
can directly choose a required background color. The conditional format
will override this for sundays.

--------------
Mangesh

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Conditional formatting and weekdays

forgot to mention:
copy paste the format for the rest of the 30 cells.

--------------
Mangesh

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Conditional formatting and weekdays

Out of month

=MONTH(DATE(YEAR($B$1),MONTH($B$1),B2))<MONTH($B$ 1)

--
HTH

Bob Phillips

"Jagruti" wrote in message
...
Hi,
Need some help for the captioned subject.
I am entering a date on the top cell of col B

Then there are numbers from 1 to 31 from cell B5 downwards.
These numbers represent the day of the month.

I want to highlight the cells that are having sundays with
one colour and those out of month with another colour.

Is it possible?
Thanks,
Jagruti.



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
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
using conditional criteria for weekdays thebehavioranalyst Excel Discussion (Misc queries) 1 April 2nd 07 05:16 PM
Conditional formating for weekdays Diogo Excel Worksheet Functions 2 January 2nd 07 10:27 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM
Macro for formatting columns with dates, weekdays, and widths? [email protected] Excel Programming 0 January 27th 05 07:19 PM


All times are GMT +1. The time now is 07:25 AM.

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"