Automatic Time/Date Stamp When Neighboring Cell is Edited

LabraLime

New Member
Joined
Jun 14, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a live worksheet that several people work on and I am curious to see if there is a way to automatically enter a time/date stamp whenever a neighboring cell is updated.
For example if someone marks a N1 as "complete" then a time/date gets entered into cell Q1 so that we know when N1 was completed.

Thank you
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Momentman

Well-known Member
Joined
Jan 11, 2012
Messages
4,120
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

I have a live worksheet that several people work on and I am curious to see if there is a way to automatically enter a time/date stamp whenever a neighboring cell is updated.
For example if someone marks a N1 as "complete" then a time/date gets entered into cell Q1 so that we know when N1 was completed.

Thank you
You can right click the sheet tab and select view code(this should be done on the sheet where the data is located

Add the following code
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("N:N")) Is Nothing Then
        If Target.Value = "Completed" Then
            Target.Offset(0, 1).Value = Now
        End If
    End If
End Sub
The code assumes that the change will occur somewhere in Column N and the column just to the right will be updated accordingly

i am assuming that the word "Completed" will be typed or selected and is not generated by a formula
 

Forum statistics

Threads
1,147,635
Messages
5,742,245
Members
423,717
Latest member
rubthenut

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
Top