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?
 
Ok, i hope this works for you, it just did for me:
mr excel questions 34.xlsm
AB
1
2
3Date:2023-05-09 13:27
4Status:Approved
5Approved BY:gymwrecker
6
7Approved by gymwrecker on 09 May, 2023 @ 13:27: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
B3Custom=AND(B3>(NOW()-TIME(0,5,0)),B3<(NOW()+TIME(0,5,0)))
B4Custom=AND(LEN(B4)>0,B4="Approved")
B5Custom=AND(B3=TODAY(),B4="Approved")
 
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
please copy and paste your exact formula in cell B7?
 
Upvote 0
and how are you entering the date and time in cell B3?
 
Upvote 0
change the format of your cell B3 to: custom format: yyyy-mm-dd hh:mm:ss or mm-dd-yyyy hh:mm:ss or dd-mm-yyyy hh:mm:ss
Whichever format you want. but show the time portion.
 
Upvote 0
Yes, I copied your formula in B7 w/o; did not change anything. Formatted B3 yyyy/mm/dd h:mm and still shows as 0:00

Note: remove the seconds from the time stamp...
 

Attachments

  • B3.png
    B3.png
    42.2 KB · Views: 4
Upvote 0
humor me please ... and post the formula I asked you to do?

Also, please use the formats and formulas as I have them EXACTLY until you get them to work... then you can change them in whatever way you want.

It works for me... It should work for you. So get it to work my way, then you can alter as you wish.
 
Upvote 0
and what is the value in cell B3? The "quick view" in the formatting pane makes me think you did not add the time.
 
Upvote 0
I hope all this explains it correctly now. It seems to work for me:
But you should format B3 as a date and time format (to your comfortable format, but should have h:m:s as well).

mr excel questions 34.xlsm
AB
1
2
3Date:2023-05-09 13:37
4Status:Approved
5Approved BY:gymwrecker
6
7Approved by gymwrecker on 09 May, 2023 @ 13:37: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
B3Custom=AND(B3>(NOW()-TIME(0,5,0)),B3<(NOW()+TIME(0,5,0)))
B4Custom=AND(LEN(B4)>0,B4="Approved")
B5Custom=AND(B3>(NOW()-TIME(0,5,0)),B3<(NOW()+TIME(0,5,0)),B4="Approved")




Data validation error message for the date entry:

View attachment 91284


Data validation error message for the "Approved" entry:

View attachment 91285



Data validation error message for the Approver's name (this also checks the date again):
View attachment 91286
awoohaw, it works now!!!! Thank you for your time and patience!! It's greatly appreciated.
 
Upvote 0
Awesome. Glad it works.
I did see a typo in the error message for cell B5. It says date/time in B5, but should say date/time in B3.

Best Wishes!
 
Upvote 0
and what is the value in cell B3? The "quick view" in the formatting pane makes me think you did not add the time.
I had =today() instead of =now() in B3, that's why it was not working.... 🤦‍♂️ It's good now!!! TY!!!
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,904
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