Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sea0221
 
Posts: n/a
Default Highlight a row if a specific cell is specific numbers/words

How do I format a cell with varibles to hightlight a row if a cell in that
specific row is a specific number or word?

Example:
If cell C4 is dog, then hightlight the row blue, if the cell C4 is cat, then
hightlight the row green, if cell C4 is bird, then hightlight the row yellow.

Hope this is clear.
  #2   Report Post  
Don Guillett
 
Posts: n/a
Default

right click sheet tabview codeinsert thischange color numbers to
suitSAVE
Now it will work for the active row and col C

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Cells(Target.Row, "c")
Case Is = "dog": x = 3
Case Is = "cat": x = 4
Case Else
End Select
Target.EntireRow.Interior.ColorIndex = x
End Sub

--
Don Guillett
SalesAid Software

"sea0221" wrote in message
...
How do I format a cell with varibles to hightlight a row if a cell in that
specific row is a specific number or word?

Example:
If cell C4 is dog, then hightlight the row blue, if the cell C4 is cat,

then
hightlight the row green, if cell C4 is bird, then hightlight the row

yellow.

Hope this is clear.



  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Select the entire row.

FormatConditional FormattingCondition 1Formula is:

=$C4="dog" format to blue pattern

AddCondition 2Formula is:

=$C4="cat" format to green

AddCondition 3...you get drift.

Note: only 3 conditions permitted. 4 if you count the default color.

If more needed, you can use worksheet event code.

Post back for example if desired.


Gord Dibben Excel MVP



On Tue, 8 Mar 2005 11:49:07 -0800, "sea0221"
wrote:

How do I format a cell with varibles to hightlight a row if a cell in that
specific row is a specific number or word?

Example:
If cell C4 is dog, then hightlight the row blue, if the cell C4 is cat, then
hightlight the row green, if cell C4 is bird, then hightlight the row yellow.

Hope this is clear.


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 to COUNT THE FREQUENCY of specific CHARACTER WITHIN a CELL? Shooting Star Excel Discussion (Misc queries) 1 February 22nd 05 11:15 PM
Highlight Active Cell...With a Diffrence Peter Excel Discussion (Misc queries) 1 January 31st 05 02:18 PM
How do I make a cell date specific to input a value on a specific. ebuzz13 Excel Discussion (Misc queries) 1 January 18th 05 06:53 PM
How do I insert an image into a specific cell within a protected . Scott Peebles Excel Discussion (Misc queries) 1 January 7th 05 02:14 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM


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