Hey all,
I have the below pieces of code
Time Stamp
Sort
My issue is that when I go to sort, the time stamp is still updating when it should only be updating based on the formula in Column I changing. I have another program that uses the same code and the time stamp is fine. Can anybodyhelp me figure out why the time stamp updates?
I have the below pieces of code
Time Stamp
Code:
Option Explicit
Private Sub Worksheet_Calculate()
Dim CELL As Range
Application.EnableEvents = False
For Each CELL In Range("I3:I32")
If CELL.Value <> CELL.Offset(, 26).Value Then
With CELL.Offset(, -1)
.NumberFormat = "mm/dd/yy h:mm"
.Value = Now
End With
CELL.Offset(, 26).Value = CELL.Value
End If
Next CELL
Application.EnableEvents = True
End Sub
Sort
Code:
Sub Sort()
'
' sort Macro
' Macro recorded 5/21/2010 by rvinci
Rows("3:32").Select
Selection.Sort Key1:=Range("G3"), Order1:=xlAscending, Key2:=Range("H3") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
End Sub
My issue is that when I go to sort, the time stamp is still updating when it should only be updating based on the formula in Column I changing. I have another program that uses the same code and the time stamp is fine. Can anybodyhelp me figure out why the time stamp updates?