+ Reply to Thread
Results 1 to 2 of 2

Cell value change event

  1. #1

    Cell value change event

    hello I have alteast 1000 rows and 1 column in excel sheet and each
    cell in the excel sheet has a formula. I need to track the change in
    each cell. If i were using excel_change event it would have been easy
    for me to track the address of the changing cell. Since i am using
    formulas in all cell i can trap the change event only by
    sheet_calculate event ,but the drop back for this event is i can't trap
    the address of the changing cell. Is there any way i can trap the
    address of the changing cell value which has formula defined in it????


  2. #2
    Patrick Molloy
    Guest

    RE: Cell value change event

    try this....it uses sheet2!A1:A1000 to save the values from sheet1!A1:A1000
    when sheet1 calculates, teh cvalues are checked, the the latest values
    copied back to sheet2

    Put this code on Sheet1's code page:

    Option Explicit
    Private Sub Worksheet_Calculate()
    CheckValues
    End Sub
    Sub setValues()
    Worksheets("sheet2").Range("A1:A1000").Value = _
    Worksheets("sheet1").Range("A1:A1000").Value
    End Sub

    Sub CheckValues()
    Application.EnableEvents = False

    With Worksheets("sheet1").Range("B1:B1000")
    .Formula = "=IF(A1 = Sheet2!A1,"" "",""CHANGED"" )"
    .Value = .Value
    End With
    setValues
    Application.EnableEvents = True
    End Sub


    if you want to see what the prev value was, change
    .Formula = "=IF(A1 = Sheet2!A1,"""",""CHANGED"" )"
    to
    .Formula = "=IF(A1 = Sheet2!A1,"""", Sheet2!A1)"


    "[email protected]" wrote:

    > hello I have alteast 1000 rows and 1 column in excel sheet and each
    > cell in the excel sheet has a formula. I need to track the change in
    > each cell. If i were using excel_change event it would have been easy
    > for me to track the address of the changing cell. Since i am using
    > formulas in all cell i can trap the change event only by
    > sheet_calculate event ,but the drop back for this event is i can't trap
    > the address of the changing cell. Is there any way i can trap the
    > address of the changing cell value which has formula defined in it????
    >
    >


+ 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