Track Changes without sharing

ecraig09

New Member
Joined
Jan 13, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi there,

My coworker and I are in need of either a code or a macro to help us out. Our staff track their work on an excel sheet currently with various tabs and functions. They turn the documents in weekly, and we are trying to see if there is a way that we can see when changes were made to the document when they turn it in to us. Ideally we would like this to be on a hidden additional tab. While the track changes History tab gives us a lot of what we are looking for, unfortunately we cannot have these be shared documents for privacy reasons. But the same basic idea is what we are looking for. An additional tab -- that we can hide and unhide -- that will log the date and time of any changes that they make to the document.

Any help is appreciated!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Adding this code to a worksheet module will add values to a sheet added called "tracker". I added it to 2 sheets and made some changes.

Range("A1:Z" & LastRowS) will look at any changes made in A:Z

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range
    Dim tracker As Worksheet
    Dim mysheet As Worksheet
    Dim LastRowT As Long
    Dim LastRowS As Long

    Set tracker = Sheets("tracker")
    Set mysheet = ActiveSheet
    LastRowT = tracker.Cells(tracker.Rows.Count, "A").End(xlUp).Row + 1
    LastRowS = mysheet.UsedRange.Rows(mysheet.UsedRange.Rows.Count).Row

    Set KeyCells = Range("A1:Z" & LastRowS)

    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
        Range(Target.Address).Copy tracker.Cells(LastRowT, 1)
        tracker.Cells(LastRowT, 3) = Now()
        tracker.Cells(LastRowT, 2) = mysheet.Name & " " & Target.Address
    End If
End Sub


Updated ValueChange made to cellDate/Time of Change
exampleSheet2 $C$3
14/01/21 10:05​
5​
Sheet1 $E$8
14/01/21 10:05​
usefulSheet2 $A$9
14/01/21 10:05​
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top