Current Month

G

Guest

Cells B1:D1 have a date format: Jan-05, Feb-05, Mar-05 (mmm-yy). If the month
is the current month, I would like to have that month and the four cells
immediately below that month highlighed. For example, since March is the
current month, I would like cells D1:D5 highlighted. The highlighting would
roll automatically based on the current month.

Thanks,
 
B

Bob Phillips

Use conditional formatting

Select B1:D5
Format>Conditional Formatting
Change Condition1 to Formula Is
Add a formula of =MONTH(B$1)=MONTH(TODAY())
Click Format
Select the pattern tab
Select a colour

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

I can help you identify the current month but no more. Maybe someone else
can do it more elegantly.

Let's say you are evaluating cell B1

B2: =IF(MONTH(A2)=MONTH(TODAY()),"Current","")

Will return "Current Month" if it's the current month. Otherwise, will
return a blank.
 
B

Bob Phillips

BTW, I assume that B1:D1 have a real date, not just text. If it is text, try
a formula of

=PROPER(LEFT(B$1,3))=TEXT(TODAY(),"mmm")


--

HTH

RP
(remove nothere from the email address if mailing direct)


Bob Phillips said:
Use conditional formatting

Select B1:D5
Format>Conditional Formatting
Change Condition1 to Formula Is
Add a formula of =MONTH(B$1)=MONTH(TODAY())
Click Format
Select the pattern tab
Select a colour

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

Thanks!
Yes, it has a real date (mmm-yy). That did highlight the current month. Is
there a way to have the four cells immediately below the cell with the
current month also highlighted? Those cells would have numbers.

Howard

Bob Phillips said:
BTW, I assume that B1:D1 have a real date, not just text. If it is text, try
a formula of

=PROPER(LEFT(B$1,3))=TEXT(TODAY(),"mmm")


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

If you select B1:D5 as I originally stated, it will apply to al cells, and
so the 4 below are formatted as well

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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