Time stamping a row

mnovom

New Member
Joined
Sep 5, 2014
Messages
1
I want a formula that will automatically put a time stamp in whenever I make a change to a certain row. For example: If I have people's names in going down in Column A, I would like the time stamp column to be in Column B. Then whenever I add new information about the person in Columns C, D, E, F, etc. the time stamp in Column B will show the day and time of the most recent entry.

Is this possible? Please help.

Mark
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi and welcome to the forum,

You could try this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    Range("B" & Target.Row).Value = Now()
    Application.EnableEvents = True
End Sub

You will need to paste it into the macro space for the worksheet you are using e.g.Sheet1.

Every time a change is made to the worksheet that macro will run.
Code:
    Range("B" & Target.Row).Value = Now()
Is the one that writes the date and time now into column B in the cnanged row.

Code:
    Application.EnableEvents = False
is required to stop that change re-triggering the macro because writing a number into column B is a change. Without that line the macro gets stuck in a loop until it runs out of resources.

Setting it to True at the and switches the events back on so the next change will be picked up.
 
Upvote 0

Forum statistics

Threads
1,214,845
Messages
6,121,902
Members
449,053
Latest member
Guy Boot

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