Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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)"


" 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
cell value change event alinasir Excel Worksheet Functions 1 August 30th 05 10:57 AM
Cell Change Event Ernst Guckel[_4_] Excel Programming 3 April 8th 05 07:25 AM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Cell Change Event Graham[_6_] Excel Programming 8 February 26th 04 04:27 PM


All times are GMT +1. The time now is 09:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"