-1

Friends,

Just simple question...

How can i change cell's color if it contain date of weekend?

I am using Microsoft Excel 2011 - With OSx (Mac)

enter image description here

Raj
  • 1,213
  • 2
  • 16
  • 34
  • 1
    possible duplicate of [Conditional formatting based on date](http://stackoverflow.com/questions/11400471/conditional-formatting-based-on-date) – iDevlop Nov 12 '13 at 12:50
  • I've tried out 'Conditional formatting based on date', But it is comparing only single cell for formatting... See the attached Screenshot. I want cell formatting like it. – Raj Nov 12 '13 at 13:07
  • @iDevlop : I think this is not a duplicate... – Raj Nov 12 '13 at 13:09

2 Answers2

0

I have tested the following in Excel 2010, on Win 7, but I would be very much surprised if it did now work in your case.

Say your target cell is A1. Then add Conditional Formatting -> Use a formula to determine which cells to format, and in the rule description enter =OR((A1="Sat"),(A1="Sun")). Then apply whatever format you want. Replace "Sat" and "Sun" with whatever suits you best.

0

Assuming you have a date in A1 you can use this formula in conditional formatting to format weekend dates only

=AND(WEEKDAY(A1,2)>5,A1<>"")

I included a check to ensure that A1 is not blank because Excel normally considers truly blank cells to be Saturdays (!), so blanks would be formatted too without that addition.....

If you consider "the weeekend" to be Sunday only as implied by your question title then change to

=WEEKDAY(A1)=1

barry houdini
  • 45,615
  • 8
  • 63
  • 81