# Conditional format dates to display weekends

#### starsky

##### New Member
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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

#### IML

##### MrExcel MVP
You could use the formula
=WEEKDAY(A1,2)>5

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

#### lenze

##### Legend
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
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
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

#### starsky

##### New Member
awsome. thanks for your help. Much obliged .

Replies
14
Views
235
Replies
4
Views
134
Replies
3
Views
211
Replies
8
Views
284
Replies
3
Views
234

1,181,645
Messages
5,931,200
Members
436,782
Latest member
talhafiaz

### 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.

### Which adblocker are you using?

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

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