I want to use conditional formatting to change the colour of the entire row when the date on A1 is any date in September (01/09/09 to 30/09/09).
Can somebody provide me the formula for this?
I want to use conditional formatting to change the colour of the entire row when the date on A1 is any date in September (01/09/09 to 30/09/09).
Can somebody provide me the formula for this?
Which row?
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
The "Formula Is" option for conditional formatting just needs something that resolves to true or false; think of the first part of an IF statement.
Here's one possible solution: =AND($A$1>VALUE("09/01/2009"),$A$1<VALUE("09/30/2009"))
Note that you have to make A1 into an absolute reference: $A$1
You could also put your two dates into two other cells and use absolute references in your conditional formatting to use them. This would prevent having to do "low-level" edits to your spreadsheet if you need it in the future.
Thanks masteff.
But it does not seem to work.
Opps... should have been <= and >=. That's what I get for not testing the end points.
=AND($A$1>VALUE("09/01/2009"),$A$1<VALUE("09/30/2009"))
Sorry, pasted the wrong bit. Should be: =AND($A$1>=VALUE("09/01/2009"),$A$1<=VALUE("09/30/2009"))
- Highlight the rows or range of cells that you want to apply the conditional formatting to
- On the menu, go to Format, Conditional Formatting
- In Condition 1, change "Cell Value Is" to "Formula Is"
- Copy and paste the formula into the box to the right of that
- Click the "Format..." button
- Click the patterns tab and pick a color of your choice
- Ok, Ok
Other options if you really are only ever checking for a given month:
=($A1-DAY($A1)+1)=DATE(2009,1,1)
or
=TEXT($A1,"MMYY")="0909"
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks