Is there a way, either using a forumula or VB that I can capture the date a cell was modified ?
Is there a way, either using a forumula or VB that I can capture the date a cell was modified ?
Nothing is beyond our reach
Use the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
Set rng = Worksheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0)
rng(1, 1) = Target.Address
rng(1, 2) = Now()
End Sub
You will have to create a sheet where you need to save the data i.e. modified range and the date. In the above code, the sheet where this information is saved in Sheet2. This code has to be saved in the module for the sheet for which you want to find the cell modification dates. Suppose you want to do this for Sheet1. Right-click on the name tab of this sheet and click view code. Enter the above code, and you are ready.
- Mangesh
Thats excellent but how do I get it to only check for modifications to a certain column, say column 'X' for example ?
To check for column B:
Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Column = 2 then
Set rng = Worksheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0)
rng(1, 1) = Target.Address
rng(1, 2) = Now()
end if
End Sub
- Mangesh
Cheers !
One final thing. DO you know how I could capture the user that input the data aswell ?
Never mind. Done it now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks