ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Event Track (https://www.excelbanter.com/excel-programming/322831-change-event-track.html)

Rafael

Change Event Track
 
Hi , does anybody know how to track a change of a linked cell value ?
The event change recognizes manual changes, but not linked changes.
This would be great.

Thanks , Rafael

Bernie Deitrick

Change Event Track
 
Rafael,

You need a second cell to store a value to compare it to. So, for example,
if cell A1 has a link to another cell, and cell A2 is available to store the
comparative value, then this event code will work:

Private Sub Worksheet_Calculate()
If Range("A1").Value < Range("A2").Value Then
MsgBox "Cell A1 has changed"
Application.EnableEvents = False
Range("A2").Value = Range("A1").Value
Application.EnableEvents = True
End If
End Sub

HTH,
Bernie
MS Excel MVP

"Rafael" wrote in message
...
Hi , does anybody know how to track a change of a linked cell value ?
The event change recognizes manual changes, but not linked changes.
This would be great.

Thanks , Rafael





All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com