IF statement for Time Ranges

LISA21

New Member
Joined
Nov 10, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I have time ranges 7:00AM to 11:59 TIME IN AM, and within the range of 12:00 to 12:59, there is TIME OUT AM and TIME IN PM, and 1:00PM to 4:30 PM time out, I don't know how to make th TIME OUT AM and TIME IN PM appear , because they are in the same interval.
. ,
Capture.PNG

=IF(AND(D2>=TIMEVALUE("16:30"),D2>TIMEVALUE("16:30")),"4.PM OUT",IF(AND(D2>=TIMEVALUE("5:30"),D2<TIMEVALUE("8:00")),"1. IN AM",IF(AND(D2>=TIMEVALUE("12:00"),D2<TIMEVALUE("12:59")),"PM IN","AM OUT")))
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
What is the differentiator? How do you know if the date/time is supposed to be a TIME IN value or a TIME OUT value?
Or is this a consecutive time punch for the same person? If so, what happens if they forgot to punch out, or punch in?
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,974
Members
449,095
Latest member
Mr Hughes

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