What is a formula for a set time and one for date that doesn't change?

Caveman1964

Board Regular
Joined
Dec 14, 2017
Messages
121
I have a formula to put a time and time in a cell but it changes every time I do something in the spreadsheet.
looking for one that does static time and date and also formula that does static date and time separately.
Anybody know how to do this?
appreciate any help!
Thanks!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
It's not a formula, but I gather you can input the current date and time into a cell using the two keyboard shortcuts ctrl+: and ctrl+;
 
Upvote 0
It's not a formula, but I gather you can input the current date and time into a cell using the two keyboard shortcuts ctrl+: and ctrl+;

yeah I was wanting to make a macro to do it so they could just click a button. I did not describe that well in my post. Thanks for replying!
 
Upvote 0
This will put today's date in A1 & the date & time in B1
Code:
Sub DateNTime()
   Range("A1").Value = Date
   Range("B1").Value = Now()
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
This will put today's date in A1 & the date & time in B1
Code:
Sub DateNTime()
   Range("A1").Value = Date
   Range("B1").Value = Now()
End Sub
Just to add one more, here is for the time only...

Range("C1").Value = Time
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,404
Members
449,156
Latest member
LSchleppi

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