You are here:

Excel/Conditionnal formatting regarding date

Advertisement


Question
Good day Craig,
How do I make a cell turn grey if the date in a cell is either a Saturday or Sunday?

Answer
Hi Daniel,

You will need to add a second column (that you can hide) that references the date and assigns it a number 1 through 7, 1 being Sunday and 7 being Saturday

In column A, referencing the date in column B

=weekday(B1)

Now, you can set your conditional formatting in column B if B1 = 1 or 7, then turn grey.

Hope that helps,

-Craig
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

All Answers


Answers by Expert:


Ask Experts

Volunteer


Craig

Expertise

I can answer most general questions, including formatting, shortcuts, pivot tables etc. I have just started using macros, so vba is not my strong suit. I also enjoy explaining the solution at the questioners level of understanding. I am an accountant by trade, so that is my primary area of expertise, but I am willing to tackle just about anything.

Experience

10 years

Education/Credentials
BA - Business '96, CPA '98

©2010 About.com, a part of The New York Times Company. All rights reserved.