Cell Range last modified formula/macro

tigerlily33

New Member
Joined
Aug 11, 2014
Messages
4
Hi,

I'm looking for a macro or formula to use so that each time data in each individual row is modified on the spreadsheet, it records the date it was last modified in column J for each row/

I've tried various macros but am also slightly unsure of how to use them.

I'm using Excel 2013, if anyone could help I'd be really grateful!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the board.

Here's some sheet code you can use.

To install the code:
1. Right-click the worksheet tab you want to apply it to and choose 'View Code'. This will open the VBE window.
2. Copy the code below from your browser window and paste it into the white space in the VBE window.
3. Close the VBE window and Save the workbook. If you are using Excel 2007 or a later version do a SaveAs and save it as a macro-enabled workbook (.xlsm file extension).
4. Make sure you have enabled macros whenever you open the file or the code will not run.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Application
    .EnableEvents = False
    .ScreenUpdating = False
End With
Cells(Target.Row, "J") = Date
Columns("J").AutoFit
With Application
    .EnableEvents = True
    .ScreenUpdating = True
End With
End Sub
 
Upvote 0
Sorry Joe, spoke to soon!

Is there a way of recording this in column J, row 2 downwards? I have titles in row A and need them to not be affected by the macro.

Thanks!
 
Upvote 0
Sorry Joe, spoke to soon!

Is there a way of recording this in column J, row 2 downwards? I have titles in row A and need them to not be affected by the macro.

Thanks!
Like this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 1 Then Exit Sub
With Application
    .EnableEvents = False
    .ScreenUpdating = False
End With
Cells(Target.Row, "J") = Date
Columns("J").AutoFit
With Application
    .EnableEvents = True
    .ScreenUpdating = True
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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