Formula to Determine Datetime With 3 Criteria Based on Same Name

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all..

how to solve this problem:
this criteria:
Clock in:
06.00.00 till 07.15.00
Clockout
17.00.00 till 24.00.00
with option
"ok" or "late" or "overtime"
nov 2023 (version 1).xlsb
ABC
1date-timeexpected resultname
201/11/2023 07:04:15okKiki
301/11/2023 17:19:41okKiki
402/11/2023 05:58:26lateSisca
502/11/2023 17:34:42okSisca
601/11/2023 07:07:25okDarwin
701/11/2023 16:43:44overtimeDarwin
802/11/2023 07:05:45Jack
902/11/2023 17:23:44Jack
1004/11/2023 07:06:27Milla
1104/11/2023 17:36:17Milla
Sheet1 (2)


any one help me out, greately appreciated..
my target in column B2 down

susant0
 
my target still in col B2 down with this rules
anytime before 06:00 - is late
anytime between 7:15 and 17:00 is overtime
and
if a single rows/line is late

note:
the rows not always couple/pairs
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
=IF(COUNTIF($C$2:$C$100,C2)=1,"Late",IF((A2-INT(A2))<TIMEVALUE("06:00:00"),"late",IF(AND((A2-INT(A2))>TIMEVALUE("07:15:00"),(A2-INT(A2))<TIMEVALUE("17:00:00")),"overtime","ok")))

names need to be unique

Book3
ABCD
1date-timeexpected resultname
207:04:15okKikiLate
305:58:26lateSiscalate
417:34:42okSiscaok
507:07:25okDarwinok
616:43:44overtimeDarwinovertime
707:05:45okJackok
817:23:44okJackok
907:06:27okMillaLate
Sheet1
Cell Formulas
RangeFormula
D2:D9D2=IF(COUNTIF($C$2:$C$100,C2)=1,"Late",IF((A2-INT(A2))<TIMEVALUE("06:00:00"),"late",IF(AND((A2-INT(A2))>TIMEVALUE("07:15:00"),(A2-INT(A2))<TIMEVALUE("17:00:00")),"overtime","ok")))
 
Upvote 1

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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