+ Reply to Thread
Results 1 to 7 of 7

Worksheet Change Event-when a cell with a certain range of cells) are changed?

  1. #1
    Steph
    Guest

    Worksheet Change Event-when a cell with a certain range of cells) are changed?

    Hello. How can I have a worksheet_Change event trigger only when certain
    cells (more specifically - when a cell with a certain range of cells) are
    changed? Thanks!



  2. #2
    Paolo De Laurentiis
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    I don't think it is possible: the range object doesn't have any event that
    can be triggered.
    You have to understand what range generated the event inside the
    worksheet_change event.

    Paolo


    "Steph" <[email protected]> ha scritto nel messaggio
    news:[email protected]...
    > Hello. How can I have a worksheet_Change event trigger only when certain
    > cells (more specifically - when a cell with a certain range of cells) are
    > changed? Thanks!
    >
    >




  3. #3
    Rob van Gelder
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("C1:C5")) Is Nothing Then
    MsgBox "Changed!"
    End If
    End Sub

    Take care because Target may not always be just the single cell.

    --
    Rob van Gelder - http://www.vangelder.co.nz/excel


    "Steph" <[email protected]> wrote in message
    news:[email protected]...
    > Hello. How can I have a worksheet_Change event trigger only when certain
    > cells (more specifically - when a cell with a certain range of cells) are
    > changed? Thanks!
    >
    >




  4. #4
    Chip
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    What are the cells?

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
    MsgBox ("ACTIVE")
    Else
    End If
    End Sub


  5. #5
    Chip
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    Ooh..his is better.


  6. #6
    Steph
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    Thanks so much Rob! Can I ask a follow up to your post on the other message
    I posted regarding the "before event"?

    You posted "You must store the value separately as the cell changes so you
    can refer to
    the value at next change." How would I go about doing that? My goal in
    this is to create a change log on a worksheet that multiple people will be
    changing. Thanks again for your help!!


    "Rob van Gelder" <[email protected]> wrote in message
    news:[email protected]...
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > If Not Intersect(Target, Range("C1:C5")) Is Nothing Then
    > MsgBox "Changed!"
    > End If
    > End Sub
    >
    > Take care because Target may not always be just the single cell.
    >
    > --
    > Rob van Gelder - http://www.vangelder.co.nz/excel
    >
    >
    > "Steph" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello. How can I have a worksheet_Change event trigger only when

    certain
    > > cells (more specifically - when a cell with a certain range of cells)

    are
    > > changed? Thanks!
    > >
    > >

    >
    >




  7. #7
    Rob van Gelder
    Guest

    re: Worksheet Change Event-when a cell with a certain range of cells) are changed?

    You're welcome.

    You should really stick to the original thread.

    I've never done change tracking this way before. I'm concerned I couldn't
    capture every change - I could be wrong..

    If I were to give it a serious go, I might create a two column table. First
    row for cell address, Second row for previous value. Kind of like a
    transaction log.
    I'd recommend using Excel's built in Track Changes feature.


    --
    Rob van Gelder - http://www.vangelder.co.nz/excel


    "Steph" <[email protected]> wrote in message
    news:%[email protected]...
    > Thanks so much Rob! Can I ask a follow up to your post on the other
    > message
    > I posted regarding the "before event"?
    >
    > You posted "You must store the value separately as the cell changes so
    > you
    > can refer to
    > the value at next change." How would I go about doing that? My goal in
    > this is to create a change log on a worksheet that multiple people will be
    > changing. Thanks again for your help!!
    >
    >
    > "Rob van Gelder" <[email protected]> wrote in message
    > news:[email protected]...
    >> Private Sub Worksheet_Change(ByVal Target As Range)
    >> If Not Intersect(Target, Range("C1:C5")) Is Nothing Then
    >> MsgBox "Changed!"
    >> End If
    >> End Sub
    >>
    >> Take care because Target may not always be just the single cell.
    >>
    >> --
    >> Rob van Gelder - http://www.vangelder.co.nz/excel
    >>
    >>
    >> "Steph" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Hello. How can I have a worksheet_Change event trigger only when

    > certain
    >> > cells (more specifically - when a cell with a certain range of cells)

    > are
    >> > changed? Thanks!
    >> >
    >> >

    >>
    >>

    >
    >




+ 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