conditional formatting match month

Y

yuen

I'm finding it difficult with conditional formatting matching the month for
=today() in cell b2 for example. the purpose is to match the month for a date
ranging from d15:d24 and then highlight if the month matches.

Any ideas? ive been working on this for 3 days now. thanks.
 
T

T. Valko

Try this:

Select your entire range D15:D24

In Excel versions 2003 and earlier

Goto the menu Format>Conditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=MONTH(B$2)=MONTH(D15)
Click the Format button
Select the desired style(s)
OK out

In Excel 2007

Goto Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a
formula to determine which cells to format
Enter this formula in the box below:
=MONTH(B$2)=MONTH(D15)
Click the Format button
Select the desired style(s)
OK out

If there might be empty cells in your range D15:D24, or if B2 might be
empty, then use this formula:

=AND(B$2<>"",D15<>"",MONTH(B$2)=MONTH(D15))
 
M

Max

You can apply the CF directly w/o referencing
Select D15:D24 (with D15 active), then apply CF using Formula Is:
=AND(ISNUMBER(D15),MONTH(D15)=MONTH(TODAY()))
Format to taste > OK out

If the above doesn't work, that means the dates in D15:D24 aren't real
dates. Select the range of "dates", convert it all at one go by clicking Data
Text to Columns. Click Next>Next. In step 3 of the wiz., check "Date", then
choose the appropriate format from the droplist, eg: DMY. Click Finish.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top