Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David
 
Posts: n/a
Default Conditional Formatting based on month name

I have a sheet where C2 contains the typed text of a month, i.e. February.
Range C4:D14 contains actual dates spanning several months. I would like to
highlight the cells that contain the month in C2. I've floundered around
for several hours without a solution. Any help?

P.S. I need C2 to remain text so it won't change until I change it.

--
David
  #2   Report Post  
Max
 
Posts: n/a
Default

Try:

Select C4:D14

Click Format Conditional Formatting

Under Condition 1, make the settings as:
Formula Is| =AND(TEXT(C4,"mmmm")=$C$2,C4<"")
Click Format button Patterns tab Light brown? OK
Click OK at the main dialog

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"David" wrote in message
...
I have a sheet where C2 contains the typed text of a month, i.e. February.
Range C4:D14 contains actual dates spanning several months. I would like

to
highlight the cells that contain the month in C2. I've floundered around
for several hours without a solution. Any help?

P.S. I need C2 to remain text so it won't change until I change it.

--
David



  #3   Report Post  
David
 
Posts: n/a
Default

Max wrote

Formula Is| =AND(TEXT(C4,"mmmm")=$C$2,C4<"")


Excellent!!! Reducing to =TEXT(C4,"mmmm")=$C$2 works as well, although I
can see why the test for blanks might come in handy someday.

Thanks.

P.S. While waiting for a response I was able to type 2/1 (that makes
changing months easier) in C2 and custom format as mmmm and achieve what I
wanted with:
Formula is|=MONTH(C4)=MONTH($C$2)
The secret was making C2 absolute, which I had overlooked in previous
trials.

--
David
  #4   Report Post  
Max
 
Posts: n/a
Default

You're welcome !

Formula Is| =AND(TEXT(C4,"mmmm")=$C$2,C4<"")


The ... C4<"" condition is included to prevent any blank cells within the
source range from "wrongly" triggering the CF when C2 = January

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"David" wrote in message
...
Max wrote

Formula Is| =AND(TEXT(C4,"mmmm")=$C$2,C4<"")


Excellent!!! Reducing to =TEXT(C4,"mmmm")=$C$2 works as well, although I
can see why the test for blanks might come in handy someday.

Thanks.

P.S. While waiting for a response I was able to type 2/1 (that makes
changing months easier) in C2 and custom format as mmmm and achieve what I
wanted with:
Formula is|=MONTH(C4)=MONTH($C$2)
The secret was making C2 absolute, which I had overlooked in previous
trials.

--
David



  #5   Report Post  
David
 
Posts: n/a
Default

Max wrote

The ... C4<"" condition is included to prevent any blank cells within
the source range from "wrongly" triggering the CF when C2 = January


So I discovered when testing for January. Thanks again.

--
David
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting based on Formula Pete Petersen Excel Worksheet Functions 1 January 17th 05 11:49 PM
Conditional formatting based on if statement. kevin Excel Worksheet Functions 2 January 12th 05 03:07 AM
How to do a conditional formatting based on an adjacent cell Confused Excel Discussion (Misc queries) 2 January 10th 05 09:55 PM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"