Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a row of 21 cells in column A. I have a row of 21 cells in column B.
I want column A4 to change text color based upon number entry into B4. For instance, if I enter the number 1 into B4, I would like cell A4 text to change to red. For instance, if I enter the number 2 into B5, I would like cell A5 text to change to blue. I can't use conditional formatting b/c it only gives me up to three conditions. I need 21 conditions. Thanks in advance for your help! Tee |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You will have to use a Macro to do this.
You will need to loop through the cells in Col B and upate the Interior.ColorIndex property of Cell in Col A based on the value in Col B. Following will color cells A1, A2 and A3 with Yellow, Red, and Green. Sub ColorCells Range("A1").Select With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Range("A2").Select With Selection.Interior .ColorIndex = 46 .Pattern = xlSolid End With Range("A3").Select With Selection.Interior .ColorIndex = 43 .Pattern = xlSolid End With End Sub "Tee" wrote: I have a row of 21 cells in column A. I have a row of 21 cells in column B. I want column A4 to change text color based upon number entry into B4. For instance, if I enter the number 1 into B4, I would like cell A4 text to change to red. For instance, if I enter the number 2 into B5, I would like cell A5 text to change to blue. I can't use conditional formatting b/c it only gives me up to three conditions. I need 21 conditions. Thanks in advance for your help! Tee |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
??? ONLY Two formats to be set. RED or BLUE.
Tee wrote: I have a row of 21 cells in column A. I have a row of 21 cells in column B. I want column A4 to change text color based upon number entry into B4. For instance, if I enter the number 1 into B4, I would like cell A4 text to change to red. For instance, if I enter the number 2 into B5, I would like cell A5 text to change to blue. I can't use conditional formatting b/c it only gives me up to three conditions. I need 21 conditions. Thanks in advance for your help! Tee |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need only one condition for each cell if I read your decription
properly. A4 condition would be =B4=4 format as red A5 condition would be =B5=5 format as blue Gord Dibben MS Excel MVP On Fri, 12 Sep 2008 07:31:01 -0700, Tee wrote: I have a row of 21 cells in column A. I have a row of 21 cells in column B. I want column A4 to change text color based upon number entry into B4. For instance, if I enter the number 1 into B4, I would like cell A4 text to change to red. For instance, if I enter the number 2 into B5, I would like cell A5 text to change to blue. I can't use conditional formatting b/c it only gives me up to three conditions. I need 21 conditions. Thanks in advance for your help! Tee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I change cell color in excel based on text input? | New Users to Excel | |||
Change the color of a cell based upon whats in the cell | Excel Discussion (Misc queries) | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
How do I change cell color based upon data range within the cell? | Excel Worksheet Functions | |||
How do I change cell color upon entry, and exit? | Excel Worksheet Functions |