Conditional format dates to display weekends

starsky

New Member
Joined
Oct 20, 2002
Messages
3
I have a spreadsheet that contains a calender at the top. Pretty much every day from sept 1 to may 1. Column A contains projects I'm working on. I want to map out when i'm going to do each job and how long it should take.

My question is how do I make a conditional fomat such that the weekend days are highlighted in a different color? Basicaly, how do i get excel to recogonize a weekend from a weekday.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

IML

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,743
You could use the formula
=WEEKDAY(A1,2)>5

where a1 is the cell of interest as your conditional formatting formula.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Hi: Welcome to the board.

Assume you dates are in row 1. Select Row 1 by clicking on the number 1 to the left of column A. Now choose Format>Conditional Formatting. Select the formula is option. Enter =WEEKDAY(A$1,2)>5. Choose a format. Click OK. This will format Sat. and Sun. dates
 

starsky

New Member
Joined
Oct 20, 2002
Messages
3
My dates start in cell B2 and go from there.

Does that formula work for dates in the form 10/21/02?

I'm assuming the weekday function evaluates the day of the week, so monday would =1, tuesday =2, and so on and so fourth.. correct?
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
The display format of the date does not matter. Excel works with the serial number for the date. You are correct in your assumption of the WEEKDAY function. The Second argument (The 2 after the date reference) assigns Monday as Day 1. If the second argument is omitted, the default is 1, which makes Sunday Day 1

So, select all you cells with dates in Row 2 beginning at B2. The formula is =WEEKDAY(B$2,2)>5
 

Forum statistics

Threads
1,144,312
Messages
5,723,653
Members
422,508
Latest member
Lordkit1

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