Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Can I use a macro for color coding?

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Can I use a macro for color coding?

Conditional formatting will still work. You need to change from cell value is
to formula is and then point Q:S back to the value in T. Note that
conditional formatting is looing for a True or False result in determining
whether or not to apply the format
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Can I use a macro for color coding?

You can use Conditional formatting... The formatting should use formula
=$T9<.2 format.

The $ will free at that column. Highlight the entire row at one time when
you do it, and all columns will format appropriately.

Make sense?

"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Can I use a macro for color coding?

The only problem with that is if I change it to "formula is" = to T9, it
won't change the color because it is a false statement. The formulas in
cells Q:S are all different from each other and none of the fomulas are equal
to the one in cell T.

That's why I am having so much trouble with this, but I figured a macro
could perform this color change, I just don't know how to set it up.

"Jim Thomlinson" wrote:

Conditional formatting will still work. You need to change from cell value is
to formula is and then point Q:S back to the value in T. Note that
conditional formatting is looing for a True or False result in determining
whether or not to apply the format
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Can I use a macro for color coding?

The formula would be
=T9<.02

Which will return true if T9 is less than 2% and that will invoke the
conditional format.
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

The only problem with that is if I change it to "formula is" = to T9, it
won't change the color because it is a false statement. The formulas in
cells Q:S are all different from each other and none of the fomulas are equal
to the one in cell T.

That's why I am having so much trouble with this, but I figured a macro
could perform this color change, I just don't know how to set it up.

"Jim Thomlinson" wrote:

Conditional formatting will still work. You need to change from cell value is
to formula is and then point Q:S back to the value in T. Note that
conditional formatting is looing for a True or False result in determining
whether or not to apply the format
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Can I use a macro for color coding?

Yeah! That worked! One other thing though....how would I enter the formula
for: between .0201 and .10

"Jim Thomlinson" wrote:

The formula would be
=T9<.02

Which will return true if T9 is less than 2% and that will invoke the
conditional format.
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

The only problem with that is if I change it to "formula is" = to T9, it
won't change the color because it is a false statement. The formulas in
cells Q:S are all different from each other and none of the fomulas are equal
to the one in cell T.

That's why I am having so much trouble with this, but I figured a macro
could perform this color change, I just don't know how to set it up.

"Jim Thomlinson" wrote:

Conditional formatting will still work. You need to change from cell value is
to formula is and then point Q:S back to the value in T. Note that
conditional formatting is looing for a True or False result in determining
whether or not to apply the format
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Can I use a macro for color coding?

Keep in mind, Excel's logic starts at 1 and works down. So, if first is <.02,
you can make 2nd criterion <.10. Any cells below .02 will be captured by
criterion 1. All between .02 and .1 will be captured by 2.

"pdgarza" wrote:

Yeah! That worked! One other thing though....how would I enter the formula
for: between .0201 and .10

"Jim Thomlinson" wrote:

The formula would be
=T9<.02

Which will return true if T9 is less than 2% and that will invoke the
conditional format.
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

The only problem with that is if I change it to "formula is" = to T9, it
won't change the color because it is a false statement. The formulas in
cells Q:S are all different from each other and none of the fomulas are equal
to the one in cell T.

That's why I am having so much trouble with this, but I figured a macro
could perform this color change, I just don't know how to set it up.

"Jim Thomlinson" wrote:

Conditional formatting will still work. You need to change from cell value is
to formula is and then point Q:S back to the value in T. Note that
conditional formatting is looing for a True or False result in determining
whether or not to apply the format
--
HTH...

Jim Thomlinson


"pdgarza" wrote:

I need some more help with these macros. Here is what I have done so far:

I have an if/then statement in cells T9:T25 that calculates the numbers I
have in cells Q9-25:S9-25. Then I changed the color of the font to orange.
Then I set up a conditional format for these cells:

less than -2%=red
2% to 10%=green
greater than 10%=blue
(anything between -2% and 2% will remain orange)

This part works great.

Now here is what I am trying:
I want the font in cells Q:S to change to the same color as the font in cell
T. So, if the font in cell T9 is red, I want the font in cell Q9:S9 to
change to red. If the color is green, I want it to change to green, and if
it is blue, I want it to change to blue.

I cannot use the conditional formatting for the values in cells Q:S because
the color is based on the value in cell T, not the value in Q:S.

So I think I need to set up a macro but I have no idea how to start it. I
dont know if I need to use an if/then statement or a select case macro.

Please help! Thanks

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
Macro for color coding pdgarza Excel Discussion (Misc queries) 1 September 9th 08 11:07 PM
Color coding by items jlclyde Excel Discussion (Misc queries) 6 May 21st 08 09:23 AM
color coding Chris Excel Discussion (Misc queries) 2 May 9th 07 06:43 PM
color coding Ardilla Excel Worksheet Functions 1 January 11th 06 08:49 PM
Color coding tnlovesme Excel Discussion (Misc queries) 1 May 4th 05 01:39 PM


All times are GMT +1. The time now is 04:41 PM.

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"