ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formatting and weekdays (https://www.excelbanter.com/excel-programming/325914-conditional-formatting-weekdays.html)

Jagruti

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.

Mangesh

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!

Mangesh

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!

Bob Phillips[_7_]

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.





All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com