+ Reply to Thread
Results 1 to 2 of 2

Row colour change on input

  1. #1
    Registered User
    Join Date
    06-23-2006
    Posts
    34

    Row colour change on input

    I would like to know how I can get the colour of a row to automatically change when a certain value is input, or any value at all into that column.

    Thanks

    Caroline

  2. #2
    Piotr Lipski
    Guest

    Re: Row colour change on input

    On Fri, 23 Jun 2006 05:21:11 -0500, CarolineHedges wrote:

    > I would like to know how I can get the colour of a row to automatically
    > change when a certain value is input, or any value at all into that
    > column.


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count = 1 Then
    If Target.Column = 1 Then
    Select Case Target.Value
    Case "g"
    Target.EntireRow.Interior.Color = vbGreen
    Case "b"
    Target.EntireRow.Interior.Color = vbBlue
    Case "r"
    Target.EntireRow.Interior.Color = vbRed
    Case Else
    Target.EntireRow.Interior.Color = vbWhite
    End Select
    End If
    End If
    End Sub

    --
    PL

+ 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