Date stamp help required

HDavidson

New Member
Joined
Sep 23, 2018
Messages
17
Hi all i need some help with a vba code.What i would like is a date stamp placed in a list in a worksheet in a shared workbook when each user updates their particular tab in the workbook.The date stamp need to include user name date and time in the following format username dd/mm/yy hh:mm:ss.This also needs to be blank if the user has not updated their sheet.I have pasted below what i am currently using although this does not give me seconds or blank if not updated.

[code[

Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Row >= 3 And Target.Row <= 1000 And Target.Column >= 4 Then


Cells(1, Target.Column) = Now()
Cells(2, Target.Column) = Application.UserName


End If
End Sub

[/code]

Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hello,

The seconds ... are available thanks to Now()... but not displayed ... just adjust your custom format by adding :ss

Regarding the Blank issue ...when do you need it to happen ?
 
Last edited:
Upvote 0
if the user has not updated their sheet.although i understand this will be pointless after they have made the first entry.
 
Upvote 0
if the user has not updated their sheet.although i understand this will be pointless after they have made the first entry.

Precisely ... :smile:

Could you fix your ' seconds ' issue ...?
 
Upvote 0
Hello HDavidson :)
In ThisWorkbook use
Code:
Private Sub Workbook_Open()
Sheet12.Range("e1:e2").ClearContents
End Sub
and in Sheet12 use
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row >= 3 And Target.Row <= 1000 And Target.Column >= 4 Then
Cells(1, Target.Column) = Application.UserName & " " & Format(Now(), "dd/mm/yy hh:mm:ss")
End If
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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