Date - stay static

itsgrady

Board Regular
Joined
Sep 11, 2022
Messages
115
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
I have a date field with today() that returns current date. I need for it to remain date when shift starts. The shift is from 6PM to 6AM. When form is being updated throughout the shift, the date changes to the next after 12 midnight. Is there a way to enter date automatically without it being updated after 12 midnight?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try pressing Ctrl + ;
If you want it to remain the same date via formula then you can't do it (unless you amend your iterations settings, which I won't recommend), you'll need VBA.
 
Upvote 0
Hi, assuming that after 6AM you want it to update to the current date again, you could try:

Excel Formula:
=TODAY()-(MOD(NOW(),1)<TIME(6,0,0))
 
Upvote 0
Solution
Try pressing Ctrl + ;
If you want it to remain the same date via formula then you can't do it (unless you amend your iterations settings, which I won't recommend), you'll need VBA.
Thanks for your reply.
 
Upvote 0
Hi, assuming that after 6AM you want it to update to the current date again, you could try:

Excel Formula:
=TODAY()-(MOD(NOW(),1)<TIME(6,0,0))
The formula is working great. Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,213,564
Messages
6,114,334
Members
448,567
Latest member
Kuldeep90

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