Make a End of Working Day Formula

denzo36

Board Regular
Joined
Sep 22, 2019
Messages
221
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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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