Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tee tee is offline
external usenet poster
 
Posts: 20
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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


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
How do I change cell color in excel based on text input? giffjr13 New Users to Excel 4 April 5th 23 01:05 PM
Change the color of a cell based upon whats in the cell Maneuver Excel Discussion (Misc queries) 1 April 4th 08 09:38 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
How do I change cell color based upon data range within the cell? Chris Sanders Excel Worksheet Functions 1 March 6th 06 08:59 PM
How do I change cell color upon entry, and exit? Deb Excel Worksheet Functions 1 August 4th 05 09:48 AM


All times are GMT +1. The time now is 01:57 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"