Results 1 to 2 of 2

Specify a Cell Range in Change Event

Threaded View

  1. #1
    Registered User
    Join Date
    11-23-2008
    Location
    sydney
    Posts
    6

    Specify a Cell Range in Change Event

    The following code (which I found on the forum) is almost what I need. If a change occurs in the specified cell, here L10, then, depending on the contents of the cell, it will colour the cell. How do I change this to specify a range of cells - for example, to check if the change occurs in any cell in the range L10:L200?

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address <> "$L$10" Then Exit Sub
    If Target = "Done" Then Target.Interior.ColorIndex = 6
    If Target = "Pending" Then Target.Interior.ColorIndex = 45
    End Sub
    Last edited by smithbruce; 12-11-2008 at 10:24 PM.

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