PC Review


Reply
Thread Tools Rate Thread

Conditional Format via Macro?

 
 
=?Utf-8?B?Smlt?=
Guest
Posts: n/a
 
      29th Mar 2007
I have a spreadsheet with the current month (March) in cell A1. I have a
column for each month within the spreadsheet.

For example: A1 = March. B3:M3 = January-December.

I want to create a macro (or conditional formating, if possible) that will
change the fill and font colors of the month's column that is listed in A1.

Is this possible? Thanks!
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFyayBEdWxsaW5naGFt?=
Guest
Posts: n/a
 
      30th Mar 2007
You can do this with conditional formatting quite easily using -

Cell Value Is equal to $A$1

Then choose your Font style and colour and then your pattern colour.

If you highlight all the cells first, the formatting will be applied to all.

"Jim" wrote:

> I have a spreadsheet with the current month (March) in cell A1. I have a
> column for each month within the spreadsheet.
>
> For example: A1 = March. B3:M3 = January-December.
>
> I want to create a macro (or conditional formating, if possible) that will
> change the fill and font colors of the month's column that is listed in A1.
>
> Is this possible? Thanks!

 
Reply With Quote
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      30th Mar 2007
This assumes you have real dates in A1, and in B3:M3

Select B3:M3 (B3 active), then apply the CF using the formula:
=MONTH(B3)=MONTH($A$1)
Format to taste, OK out.
This will format only the col header.

If you want to format the entire range, not just the col header in B3:M3
Select B3:M100 (B3 active), then apply the CF using the formula:
=MONTH(B$3)=MONTH($A$1)
Format to taste, OK out.
(assuming your range is row3 to row100)

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jim" wrote:
> I have a spreadsheet with the current month (March) in cell A1. I have a
> column for each month within the spreadsheet.
>
> For example: A1 = March. B3:M3 = January-December.
>
> I want to create a macro (or conditional formating, if possible) that will
> change the fill and font colors of the month's column that is listed in A1.
>
> Is this possible? Thanks!

 
Reply With Quote
 
=?Utf-8?B?Smlt?=
Guest
Posts: n/a
 
      30th Mar 2007
Thanks, Everyone! I think perhaps I didn't give enough information. My
apologies.

In cell A1 I have the current month (March).

In columns B through M, I have various formulas and values - and each column
header is a month (B1 is January, B2-B100 is the information for January),
etc. Is it possible to have Excel highlight the entire column for March (or
whatever month is listed in cell A1)?
--
Thanks for all you do!


"Max" wrote:

> This assumes you have real dates in A1, and in B3:M3
>
> Select B3:M3 (B3 active), then apply the CF using the formula:
> =MONTH(B3)=MONTH($A$1)
> Format to taste, OK out.
> This will format only the col header.
>
> If you want to format the entire range, not just the col header in B3:M3
> Select B3:M100 (B3 active), then apply the CF using the formula:
> =MONTH(B$3)=MONTH($A$1)
> Format to taste, OK out.
> (assuming your range is row3 to row100)
>
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
> "Jim" wrote:
> > I have a spreadsheet with the current month (March) in cell A1. I have a
> > column for each month within the spreadsheet.
> >
> > For example: A1 = March. B3:M3 = January-December.
> >
> > I want to create a macro (or conditional formating, if possible) that will
> > change the fill and font colors of the month's column that is listed in A1.
> >
> > Is this possible? Thanks!

 
Reply With Quote
 
Fred Smith
Guest
Posts: n/a
 
      30th Mar 2007
Yes, it is. The way you do it is to put a conditional format in each cell. Given
your new information, you will need one of two formulas.

If A1 has the *text* "March", then in B2, enter the conditional format:

=$A$1=B$1

If A1 has a *date* which you have formatted to show just the month, use:

=month($A$1)=month(B$1)

Now fill the rest of your cells with this format. I would do it by
right-clicking on the fill handle, dragging it to the end of your table (likely
M100), release the mouse button, and choose Fill Formats Only.

If you need more help wil conditional formatting, post back.

--
Regards,
Fred


"Jim" <(E-Mail Removed)> wrote in message
news:0E89B634-5F10-4A87-B993-(E-Mail Removed)...
> Thanks, Everyone! I think perhaps I didn't give enough information. My
> apologies.
>
> In cell A1 I have the current month (March).
>
> In columns B through M, I have various formulas and values - and each column
> header is a month (B1 is January, B2-B100 is the information for January),
> etc. Is it possible to have Excel highlight the entire column for March (or
> whatever month is listed in cell A1)?
> --
> Thanks for all you do!
>
>
> "Max" wrote:
>
>> This assumes you have real dates in A1, and in B3:M3
>>
>> Select B3:M3 (B3 active), then apply the CF using the formula:
>> =MONTH(B3)=MONTH($A$1)
>> Format to taste, OK out.
>> This will format only the col header.
>>
>> If you want to format the entire range, not just the col header in B3:M3
>> Select B3:M100 (B3 active), then apply the CF using the formula:
>> =MONTH(B$3)=MONTH($A$1)
>> Format to taste, OK out.
>> (assuming your range is row3 to row100)
>>
>> --
>> Max
>> Singapore
>> http://savefile.com/projects/236895
>> xdemechanik
>> ---
>> "Jim" wrote:
>> > I have a spreadsheet with the current month (March) in cell A1. I have a
>> > column for each month within the spreadsheet.
>> >
>> > For example: A1 = March. B3:M3 = January-December.
>> >
>> > I want to create a macro (or conditional formating, if possible) that will
>> > change the fill and font colors of the month's column that is listed in A1.
>> >
>> > Is this possible? Thanks!



 
Reply With Quote
 
=?Utf-8?B?Smlt?=
Guest
Posts: n/a
 
      30th Mar 2007
Fred and all ~

Thank you! Worked like a charm. I appreciate all your help!

Jim


"Fred Smith" wrote:

> Yes, it is. The way you do it is to put a conditional format in each cell. Given
> your new information, you will need one of two formulas.
>
> If A1 has the *text* "March", then in B2, enter the conditional format:
>
> =$A$1=B$1
>
> If A1 has a *date* which you have formatted to show just the month, use:
>
> =month($A$1)=month(B$1)
>
> Now fill the rest of your cells with this format. I would do it by
> right-clicking on the fill handle, dragging it to the end of your table (likely
> M100), release the mouse button, and choose Fill Formats Only.
>
> If you need more help wil conditional formatting, post back.
>
> --
> Regards,
> Fred
>
>
> "Jim" <(E-Mail Removed)> wrote in message
> news:0E89B634-5F10-4A87-B993-(E-Mail Removed)...
> > Thanks, Everyone! I think perhaps I didn't give enough information. My
> > apologies.
> >
> > In cell A1 I have the current month (March).
> >
> > In columns B through M, I have various formulas and values - and each column
> > header is a month (B1 is January, B2-B100 is the information for January),
> > etc. Is it possible to have Excel highlight the entire column for March (or
> > whatever month is listed in cell A1)?
> > --
> > Thanks for all you do!
> >
> >
> > "Max" wrote:
> >
> >> This assumes you have real dates in A1, and in B3:M3
> >>
> >> Select B3:M3 (B3 active), then apply the CF using the formula:
> >> =MONTH(B3)=MONTH($A$1)
> >> Format to taste, OK out.
> >> This will format only the col header.
> >>
> >> If you want to format the entire range, not just the col header in B3:M3
> >> Select B3:M100 (B3 active), then apply the CF using the formula:
> >> =MONTH(B$3)=MONTH($A$1)
> >> Format to taste, OK out.
> >> (assuming your range is row3 to row100)
> >>
> >> --
> >> Max
> >> Singapore
> >> http://savefile.com/projects/236895
> >> xdemechanik
> >> ---
> >> "Jim" wrote:
> >> > I have a spreadsheet with the current month (March) in cell A1. I have a
> >> > column for each month within the spreadsheet.
> >> >
> >> > For example: A1 = March. B3:M3 = January-December.
> >> >
> >> > I want to create a macro (or conditional formating, if possible) that will
> >> > change the fill and font colors of the month's column that is listed in A1.
> >> >
> >> > Is this possible? Thanks!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional format macro Jen_T Microsoft Excel Programming 2 14th Apr 2009 10:29 PM
Conditional format macro =?Utf-8?B?RWxhaW5l?= Microsoft Excel Programming 1 24th Jul 2006 05:10 PM
Conditional Format as a MACRO Gunjani Microsoft Excel Worksheet Functions 3 29th Mar 2006 05:22 PM
conditional format macro formula =?Utf-8?B?VG9kZA==?= Microsoft Excel Programming 1 20th Mar 2006 05:30 PM
conditional format macro not working - almost there =?Utf-8?B?TmF6?= Microsoft Excel Programming 3 9th Dec 2005 09:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 AM.