Results 1 to 3 of 3

Thread: Change Event: Clear Contents Adjacent Cell
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jul 2005
    Posts
    29
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Change Event: Clear Contents Adjacent Cell

    Hi,
    My validation list goes in the range C6:C15
    I need to clear the contents of the adjacent cell (D) every time I change cell (C).
    if change C6, clear D6.
    if change C7, clear D7.
    if change C8, clear D8.

    Thanks for your help.

  2. #2
    Legend lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default

    In the WorkSheet module, enter

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("$C$6:$C$15")) Is Nothing Then Exit Sub
    Target.Offset(0, 1).ClearContents
    End Sub

    HTH

    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  3. #3
    MrExcel MVP Richie(UK)'s Avatar
    Join Date
    May 2002
    Location
    UK
    Posts
    3,329
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Jerry,

    How about:
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not Intersect(Target, Range("C6:C15")) Is Nothing Then
            Target.Offset(0, 1).ClearContents
        End If
    End Sub
    HTH
    Richie

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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