Date and Time Stamp

gymwrecker

Active Member
Joined
Apr 24, 2002
Messages
390
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Is it possible to add a formula or instruction to a standard text in excel so when I copy and paste it will automatically add the date and time stamp?

This is a sample of a standard text I use since I approve 100's of personnel actions a day:

"Approved by Mr. John Doe on 05 May 23, 12:12 PM"

Can the underline date and time appear automatically when I copy in any particular cell?
 
DRSteele, I got it to work! Thank you! I'm using the following formula:

="Approved by "&Z2&" on "&TEXT(Z15,"mm/dd/yyyy, H:mm am/pm")

Where Z2 has my name, and Z15 =now()
 
Upvote 0
N.B. Your Regional Settings and requirements may or may not require alternative formatting.
Your first post stated "05 May 23, 12:12 PM"

Try the following on your system

Time 2023.xlsm
ZAA
1505-05-23 15:1605 May 23, 3:16 PM
1602-05-23 09:0702 May 23, 9:07 AM
17
1g
Cell Formulas
RangeFormula
Z15Z15=NOW()
AA15:AA16AA15=TEXT(Z15,"dd mmmm yy, h:mm Am/PM")
 
Upvote 0
I'm still using ="Approved by "&Z2&" on "&TEXT(Z15,"mm/dd/yyyy, H:mm am/pm") where Z2 has my name and Z15 "=NOW()"

"Approved by John Doe on 05/08/23, 8:17 PM"

This works for me; I just need for the "time stamp" to reflect the time group when last updated and not the "actual" time that changes when page is refreshed?
 
Upvote 0
I'm still using ="Approved by "&Z2&" on "&TEXT(Z15,"mm/dd/yyyy, H:mm am/pm") where Z2 has my name and Z15 "=NOW()"

"Approved by John Doe on 05/08/23, 8:17 PM"

This works for me; I just need for the "time stamp" to reflect the time group when last updated and not the "actual" time that changes when page is refreshed?
not sure this is what you need completely. But, post #4 requires the entry of the time the person types in their name. There is data validation built around the entry that I think does a pretty good job of being sure the data is collected all at once.

It does NOT use the TODAY() function, but requires the user to type in (by keyboard shortcut or manual) the date of the current day which is compared to in the data validation.
 
Upvote 0
awoohaw, how can I add the time stamp to it? The time of the update and not the actual time?
 
Upvote 0
I did awoohaw, and it works. Thank you!

Just curious if I can also add the time stamp to it. Something like this:
Approved by Mr. John Doe on 09 May, 2023 @12:02
 
Upvote 0
yes, when you enter the date in B3 also add the time component.
Keyboard shortcut would be CTRL-SEMI-COLON space CTRL-COLON (CTRL-SHFT-SEMI-COLON).

you need to change the validation rule for cell B3 substantially. This validates to a 5 minute before and after (you could probably change it to 1 minute if you want. See below:

mr excel questions 34.xlsm
AB
1
2
3Date:2023-05-09 12:26
4Status:Approved
5Approved BY:gymwrecker
6
7Approved by gymwrecker on 09 May, 2023 @ 12:26:00
gymwrecker
Cell Formulas
RangeFormula
B7B7=IF(SUM(--(B3:B5<>""))=3,B4&" by "&B5&" on "&TEXT(B3,"dd mmm, yyyy") & " @ " & TEXT(B3,"hh:mm:ss"),"")
Cells with Data Validation
CellAllowCriteria
B3Datenot between (NOW()-INT(NOW())-(5/(60*24))) and (NOW()-INT(NOW())+(5/(60*24)))
B4Custom=AND(LEN(B4)>0,B4="Approved")
B5Custom=AND(B3=TODAY(),B4="Approved")
 
Upvote 0
I used the suggested data validation and I'm still having a problem with the time, not sure what is it that I'm doing wrong or missing:

DATE:2023/05/09
STATUS:Approved
APPROVED BY:Mr. John Doe
Approved by Mr. John Doe on 09 May, 2023 @ 00:00:00
 

Attachments

  • data-validation.png
    data-validation.png
    17.7 KB · Views: 4
Upvote 0
sorry, although we are using dates and times, the validation doesn't seem to like it. So I just am using a custom value.

... working on it!.... sorry
 
Last edited:
Upvote 0
Thank you awoohaw! I fixed it, but still showing the time as 00:00:00

Approved by Mr. John Doe on 09 May 2023 @ 00:00:00
 

Attachments

  • data-validation.png
    data-validation.png
    41.2 KB · Views: 2
Upvote 0

Forum statistics

Threads
1,216,614
Messages
6,131,739
Members
449,668
Latest member
michaeljamesellis

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