Pull names with certain start times

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
626
Office Version
  1. 2016
Platform
  1. Windows
[TABLE="class: grid, width: 1173"]
<tbody>[TR]
[TD]NAME[/TD]
[TD]LINE[/TD]
[TD]SUN[/TD]
[TD][/TD]
[TD]MON[/TD]
[TD][/TD]
[TD]TUE[/TD]
[TD][/TD]
[TD]WED[/TD]
[TD][/TD]
[TD]THUR[/TD]
[TD][/TD]
[TD]FRI[/TD]
[TD][/TD]
[TD]SAT[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEE[/TD]
[TD]1[/TD]
[TD]4:30[/TD]
[TD]13:00[/TD]
[TD]4:30[/TD]
[TD]13:00[/TD]
[TD]4:30[/TD]
[TD]13:00[/TD]
[TD]4:30[/TD]
[TD]13:00[/TD]
[TD]4:30[/TD]
[TD]13:00[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[/TR]
[TR]
[TD]JOHN[/TD]
[TD]2[/TD]
[TD]4:45[/TD]
[TD]13:15[/TD]
[TD]4:15[/TD]
[TD]12:45[/TD]
[TD]4:15[/TD]
[TD]12:45[/TD]
[TD]4:15[/TD]
[TD]12:45[/TD]
[TD]4:15[/TD]
[TD]12:45[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[/TR]
[TR]
[TD]JAMES[/TD]
[TD]3[/TD]
[TD]6:45[/TD]
[TD]15:15[/TD]
[TD]6:45[/TD]
[TD]15:15[/TD]
[TD]6:45[/TD]
[TD]15:15[/TD]
[TD]6:45[/TD]
[TD]15:15[/TD]
[TD]6:45[/TD]
[TD]15:15[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[/TR]
[TR]
[TD]PETER[/TD]
[TD]4[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]11:15[/TD]
[TD]19:45[/TD]
[TD]11:15[/TD]
[TD]19:45[/TD]
[TD]11:15[/TD]
[TD]19:45[/TD]
[TD]11:15[/TD]
[TD]19:45[/TD]
[TD]11:15[/TD]
[TD]19:45[/TD]
[/TR]
[TR]
[TD]BOB[/TD]
[TD]5[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]11:45[/TD]
[TD]20:15[/TD]
[TD]11:45[/TD]
[TD]20:15[/TD]
[TD]11:45[/TD]
[TD]20:15[/TD]
[TD]11:45[/TD]
[TD]20:15[/TD]
[TD]11:45[/TD]
[TD]20:15[/TD]
[/TR]
[TR]
[TD]MIKE[/TD]
[TD]6[/TD]
[TD]11:30[/TD]
[TD]20:00[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]OFF[/TD]
[TD]12:30[/TD]
[TD]21:00[/TD]
[TD]12:30[/TD]
[TD]21:00[/TD]
[TD]12:30[/TD]
[TD]21:00[/TD]
[TD]11:00[/TD]
[TD]19:30[/TD]
[/TR]
</tbody>[/TABLE]

The above is a work schedule start and end time for a month that each employee will have. Im trying to get another sheet to pull all employees whose start time is before 11am and another that will pull all employees whose start time is after 11.

currently for Before 11am I am using

Code:
=IFERROR(INDEX('BID AUGUST'!$AF$6:$AF$253,SMALL(IF('BID AUGUST'!$AH$6:$AU$253<time(10,59,59),
ROW('BID AUGUST'!$AH$6:$AU$253)-ROW('BID AUGUST'!$AH$6)+1),
ROWS('BID AUGUST'!$AH$6:'BID AUGUST'!$AH6))),"")
<time(10,59,59),row('bid august'!$ah$6:$au$253)-row('bid="" august'!$ah$6)+1),rows('bid="" august'!$ah$6:'bid="" august'!$ah6))),"")[="" code]
<time(10,59,59),row('bid august'!$ah$6:$au$253)-row('bid="" august'!$ah$6)+1),rows('bid="" august'!$ah$6:'bid="" august'!$ah6))),"")[="" code]
<time(10,59,59),row('bid august'!$ah$6:$au$253)-row('bid="" august'!$ah$6)+1),rows('bid="" august'!$ah$6:'bid="" august'!$ah6))),"")

above code pulls the same name multiple time however I managed to use below code to get rid of duplicates:

Code:
=IFERROR(INDEX(AM_List, MATCH(0, COUNTIF($A$4:A4, AM_List), 0)),"")
were AM_LIST is column where the above code is in.

if there is a way combine the 2 that would be great.

also, im not able to use the codes above to and change the "<" sign to ">" sign to pull all the employees that shift starts after 11. when i do that seems like its making the "OFF" days as after 11 as well so pulls everyone since all employees have off days. Any suggestions would be greatly appreciated.
</time(10,59,59),row('bid></time(10,59,59),row('bid></time(10,59,59),row('bid></time(10,59,59),
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
not sure but its gutting off the first code but here it is

=IFERROR(INDEX('BID AUGUST'!$AF$6:$AF$253,SMALL(IF('BID AUGUST'!$AH$6:$AU$253<TIME(10,59,59),
ROW('BID AUGUST'!$AH$6:$AU$253)-ROW('BID AUGUST'!$AH$6)+1),
ROWS('BID AUGUST'!$AH$6:'BID AUGUST'!$AH6))),"")


Code:
=IFERROR(INDEX('BID AUGUST'!$AF$6:$AF$253,SMALL(IF('BID AUGUST'!$AH$6:$AU$253<TIME(10,59,59),ROW('BID AUGUST'!$AH$6:$AU$253)-ROW('BID AUGUST'!$AH$6)+1),ROWS('BID AUGUST'!$AH$6:'BID AUGUST'!$AH6))),"")
<time(10,59,59),row('bid august'!$ah$6:$au$253)-row('bid="" august'!$ah$6)+1),rows('bid="" august'!$ah$6:'bid="" august'!$ah6))),"")[="" code]<="" html=""></time(10,59,59),row('bid>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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