ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   conditional formatting match month (https://www.excelbanter.com/excel-discussion-misc-queries/212678-conditional-formatting-match-month.html)

yuen

conditional formatting match month
 
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. Valko

conditional formatting match month
 
Try this:

Select your entire range D15:D24

In Excel versions 2003 and earlier

Goto the menu FormatConditional 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 tabStylesConditional FormattingManage rulesNew ruleUse 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))

--
Biff
Microsoft Excel MVP


"yuen" wrote in message
...
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.




Max

conditional formatting match month
 
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 NextNext. 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
---
"yuen" wrote:
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.



All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com