Conditional Format Weekends

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Hi everyone,

I have a range of cells B5:G250.
In B I have the date.
In C I have the Day ( i.e. Monday )
In D I have a start time.
In E I have a finish time.
In F I have a total hours worked.
Everything is fine.

I would like to conditionally format cells B:F where C = Saturday OR Sunday please.
Any help will be greatly appreciated.

All the Best.
SHADO
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
20,373
Office Version
  1. 365
Platform
  1. Windows
Try the following...

1) Select B5:B250, making sure that B5 is the active cell

2) Format > Conditional Formatting > Formula Is

3) Enter the following formula:

=OR(WEEKDAY($C5)=1,WEEKDAY($C5)=7)

4) Choose your formatting

5) Click Ok twice

Hope this helps!
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
55,708
Office Version
  1. 365
Platform
  1. Windows
An alternative at step 3 of Domenic's suggestion is this formula:
=WEEDAY($C5,2)>5
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
20,373
Office Version
  1. 365
Platform
  1. Windows
That works a treat, thanks very much Domenic.

All the Best.
SHADO

You're very welcome! Also, if Column C can contain blanks, you may want to try the following instead...

=AND($C5<>"",WEEKDAY($C5,2)>5)

Hope this helps!
 

S.H.A.D.O.

Well-known Member
Joined
Sep 6, 2005
Messages
1,915
Hi Domenic,

You're very welcome! Also, if Column C can contain blanks, you may want to try the following instead...

=AND($C5<>"",WEEKDAY($C5,2)>5)

Hope this helps!
It could do, and that amended Formula is exactly what I was after.

Have a Great Weekend.
All the Best.
SHADO
 

Forum statistics

Threads
1,171,178
Messages
5,874,185
Members
433,033
Latest member
thatmacroguy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top