+ Reply to Thread
Results 1 to 3 of 3

Highlight a row if a specific cell is specific numbers/words

  1. #1
    sea0221
    Guest

    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. #2
    Don Guillett
    Guest

    Re: Highlight a row if a specific cell is specific numbers/words

    right click sheet tab>view code>insert this>change color numbers to
    suit>SAVE
    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
    [email protected]
    "sea0221" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Gord Dibben
    Guest

    Re: Highlight a row if a specific cell is specific numbers/words

    Select the entire row.

    Format>Conditional Formatting>Condition 1>Formula is:

    =$C4="dog" format to blue pattern

    Add>Condition 2>Formula is:

    =$C4="cat" format to green

    Add>Condition 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"
    <[email protected]> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1