Make a End of Working Day Formula

denzo36

Board Regular
Joined
Sep 22, 2019
Messages
218
Office Version
  1. 365
Platform
  1. Windows
Hi folks,

Time in Excel always confuses the hell out of me.

I have a data time field e.g. 27/03/04 14:48 and I need to compare that to 6pm on the same day to see if a task was handled before COB.

So really I'm trying to take the date from my date time field and always have the time as 6pm. I can't figure out how to do this

Below shows my 'Created' date time column and what I'd like the formula to do when I enter and copy it down.

1712311466386.png


Thanks guys
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
date is an integer and time is a decimal part

=INT(A2)+TIMEVALUE("18:00")

BUT that just makes the date and time the same date and 18:00

BUT you need to compare to see if the time was before 18:00
so maybe
=IF((A2-INT(A2))<=TIMEVALUE("18:00"),INT(A2)+TIMEVALUE("18:00"),"later than COB")

Book1
ABCD
1
23/27/24 14:483/27/24 18:003/27/24 18:00
33/28/24 14:423/28/24 18:003/28/24 18:00
43/29/24 18:193/29/24 18:00later than COB
53/30/24 11:463/30/24 18:003/30/24 18:00
Sheet1
Cell Formulas
RangeFormula
B2:B5B2=INT(A2)+TIMEVALUE("18:00")
D2:D5D2=IF((A2-INT(A2))<=TIMEVALUE("18:00"),INT(A2)+TIMEVALUE("18:00"),"later than COB")
 
Upvote 0
Solution
That works perfectly for what I need, thanks so much, really appreciate it!
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,906
Members
449,132
Latest member
Rosie14

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