Auto Update Last Modified date when row is edited

Chase S

New Member
Joined
May 7, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hey guys, i realize this is an old thread but the macros that have been posted here have been extremely helpful. I was wondering if you guys could help tailor the code a tad to fit my data sheet. I have data in columns from A-G and then more data in columns I-Q, and was ideally wanting to have the same "date modified" column updated automatically when any of the other columns are updated.
 

Attachments

  • MR Excel help.png
    MR Excel help.png
    18 KB · Views: 4

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Welcome to the Board!

I split this post off and put it in its own thread. It is usually better to post your question to a brand new thread than it is to post on to an old existing thread. Then it will appear in the "Unanswered threads" list for all to see. You can always provide a link back any other threads that might be helpful, like this: Auto Update Last Modified date when row is edited

Regarding your question, you see to imply that you are already using a version of code. Could you post your current code here for us to see? We can help you modify it.
See here on how to post your VBA code to the thread so it is in a nice, readable format: How to Post Your VBA Code

Also, you never mentioned what column you want the date stamp to be posted to.
 
Upvote 0
If, for example, you wanted to exclude column 1 (headers) and you want the Date stamp in column Z, something like this should work:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    
'   Exit if more than one cell updated at once
    If Target.CountLarge > 1 Then Exit Sub
    
'   Exit it update prior to row 2 (exclude header)
    If Target.Row < 2 Then Exit Sub
    
'   Exit if column is column H or after column Q
    If Target.Column = 8 Or Target.Column > 17 Then Exit Sub
    
'   Update column Z with Date stamp
    Cells(Target.Row, "Z") = Date
    
End Sub
I documented the code so you can see what is happening with each line, and should be able to edit it to meet your needs.
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,890
Members
449,477
Latest member
panjongshing

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