• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Track changes in sheet containing tables

Dee

Member
Hi All,


Is there a way to track the changes that we made in particular cells in the workbook containing pivot tables?

Track Changes option in excel is not highlighted in the workbook in which i am working.


I used below codes to get the same (recorded macro :)).It is also not working for this workbook.

Is there a way to do it?


Sub track_changes()

Range("C4").Select

Range(Selection, Selection.End(xlDown)).Select

With ActiveWorkbook

.HighlightChangesOptions When:=xlAllChanges

.ListChangesOnNewSheet = True

.HighlightChangesOnScreen = True

End With

End Sub


Thanks in advance,

Dee
 

Dee

Member
I tried the following macro to track the changes. But this will capture all the changes made in the workbook. I want only the changes which happened in only in column EK, EM & EO of one sheet.

your help on this will be greatly appreciated

----------------------------------------------------------------------------

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If ActiveSheet.Name = "Changes" Then Exit Sub

Application.EnableEvents = False

NewVal = Target.Value

UserName = Environ("USERNAME")

NewVal = Target.Value

Application.Undo

oldVal = Target.Value

lr = Sheets("Changes").Range("A" & Rows.Count).End(xlUp).Row + 1

Sheets("Changes").Range("A" & lr) = Now

Sheets("Changes").Range("B" & lr) = ActiveSheet.Name

Sheets("Changes").Range("C" & lr) = Target.Address

Sheets("Changes").Range("D" & lr) = oldVal

Sheets("Changes").Range("E" & lr) = NewVal

Sheets("Changes").Range("F" & lr) = UserName

Target = NewVal

Application.EnableEvents = True

End Sub

-----------------------------------------------------------------------------


Thanking you in advance,

Dee...
 
Top