Change Text Color in one cell based upon entry in referenced cell
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 |
Change Text Color in one cell based upon entry in referenced cell
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 |
Change Text Color in one cell based upon entry in referencedcell
??? 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 |
Change Text Color in one cell based upon entry in referenced cell
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 |
All times are GMT +1. The time now is 02:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com