# Work shift allocation

#### awagdarikar

##### Board Regular
Based on the Access Card Swipe data of a employee I have to find out whether he is on time in First / General /Second shift. The Swipe Time data for each employee is in One Column and the Work Shift timings are First= 6:00:00 AM, General= 9:00:00 AM, Second shift= 3:00:00 PM. I do not have shift allocation details of each employee and I want to find out Result, which shift the employee is in (Early / Shift (On Shift time) / Late) based on following 8 conditions
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
1. If Swipe Time is from 12:15:59 AM to 5:59:59 AM, Result should be “Early in First Shift”<o></o>
2. If Swipe Time is from 6:00:00 AM to 6:30:00 AM, Result should be “First Shift”<o></o>
3. If Swipe Time is from 6:30:01 AM to 7:59:59 AM, Result should be “Late in First Shift”<o></o>
4. If Swipe Time is from 8:00:00 AM to 8:29:59 AM, Result should be “Early in General Shift”<o></o>
5. If Swipe Time is from 8:30:00 AM to 12:30:00 PM, Result should be “Late in General Shift”<o></o>
6. If Swipe Time is from 12:30:01 PM to 2:59:59 PM, Result should be “Early in Second Shift”<o></o>
7. If Swipe Time is from 3:00:00 PM to 3:30:00 PM, Result should be “Second Shift”<o></o>
8. If Swipe Time is from 3:30:01 PM to 8:30:00 PM, Result should be “Late in Second Shift”<o></o>
I have been trying very hard to create a Result Column based on above 8 conditions but not able to do so,

Whooooosh Such a long description of a problem,<o></o>

Ani

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### tusharm

##### MrExcel MVP
How is it a long description if that's what it takes to completely describe the problem? {grin} And, yes, your post did a good job of describing what you want.

You have two choices:
1) Create a series of nested IF statements.
2) Put the first time (12:15:59, 6:00:00, etc.) in one column. In the adjacent column put in the corresponding result. Now, use VLOOKUP to look up the table.

If you need any more help please share what you've tried and how it doesn't meet the desired result.

Replies
4
Views
109
Replies
6
Views
63
Replies
5
Views
200
Replies
13
Views
602
Replies
4
Views
175

1,191,516
Messages
5,987,026
Members
440,074
Latest member
Emmanuelian

### 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.

### Which adblocker are you using?

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

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