VBA to show and change list of names depending on selection

bh24524

Active Member
Joined
Dec 11, 2008
Messages
319
Office Version
  1. 2021
  2. 2007
Hi, so I am looking for a way to populate a list of those who meet certain criteria. This list is for employees will are required to stay and work over-time(mando). This is also cross-posted here and I did get a solution that wasn't VBA, but I would also like a VBA solution for it.

The way this works is they will call mando in a certain department from a specific employee. This means everyone below that employee is required to stay and work extra time. I have information off to the side starting in Column O where I would list my Mando specifications - Who it is posted for, the Lift time, and the Department (which is just a simple lookup formulas) that it is for. I show mando 1 and mando 2 to incorporate possibility of multiple mando times. I've included 2 scenarios in this sample file with the second one starting in Column U. Mind you in the actual file, I do not need any of scenario 2 incorporated into a macro - I would just erase Scenario 1's data and put any data from Scenario 2 in its place since it has Mando1 and Mando2. I just separated them in this instance to show different scenarios. here is a picture of what it looks like:

1703969530393.png


So what I am looking for is for a list of names to auto-populate in alphabetical order in Column O starting in Row 6. This would be a list of everyone in the department below an individual where the mando line was drawn. So in Scenario 1, let's say mando was posted for John Smith 8 for 6:30 PM in the C61C department. What I would expect to see based on that are the following names populating starting in Row 6:
John Smith 9
John Smith 11
John Smith 14
John Smith 15
That means these people (all of which are C61C dept. employees) were required to stay until 6:30PM. They had lower seniority than John Smith 8

Scenario 2 is a little more tricky and one department tends to do this more. They might have multiple mando lines. So in their case, let's say they posted mando for John Smith 10 at 8PM in the C65L department. They also posted another Mando Line for 9 PM for John Smith 17. This means under Mando 1 section, anyone from below John Smith 8 to and including John Smith 17's name would appear in that list. So that would be the following:
John Smith 12
John Smith 13
John Smith 16
John Smith 17
These employees(all of which are C65L Dept. employees) were all required to stay until 9PM. They had lower seniority than John Smith 10

And in the Mando 2 section, I would expect to see
John Smith 19
John Smith 20
These employees(again also C65L dept. employees) were required to stay until 10 PM. They had lower seniority than John Smith 17.

I assume that a function probably couldn't handle this and I thought maybe VBA might be able to. Also, the way I've laid out the mando specifications isn't set in stone, I am open to other suggestions on how to have it if it would make a macro work. It's just the Name, Lift time, and departments that are crucial points. I had also sorted beforehand the list by date order. Does this HAVE to be the case or could the macro look at the seniority date and figure that out? Is it possible to do this based on what I've shown?
 

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.
Your data should look like this:
Book1
ABCDEFGHIJKLMNOPQRS
1NO.EMPLOYEE SEN. DATESEN. ORDERWHSESTART TIMECodeSCHDAYS OFFBIDMando 1Mando 2
2112John Smith 109/08/1970D7A-3P - (00 DAIRY)C65DB202S/SLIFTNameJohn Smith 10NameJohn Smith 17
365John Smith 206/04/1975G9A-5P - (30 GROC)C61C0158S/SLIFTLift Time9:00 PMLift Time10:00 PM
457John Smith 311/22/1976G9A-5P - (30 GROC)C61CB117S/SBAILERDeptC65LDeptC65L
5111John Smith 409/28/1977G9A-5P - (30 GROC)C61C0150S/SREC
6163John Smith 501/29/1978D7A-5P - (07 DAIRY)C65DR204S/TH/SLOAD
7132John Smith 603/19/1978P10A-6P - (62 PERISH)C65LB303S/SLIFT
8285John Smith 705/15/1979G9A-5P - (30 GROC)C61C0151S/SGW
9283John Smith 805/16/1979G9A-5P - (30 GROC)C61C1157S/SGW
10304John Smith 906/12/1979G9A-5P - (30 GROC)C61C1190S/SJAN
11380John Smith 1008/27/1979AP10A-6P - (62 PERISH)C65L1353S/SLIFT
12383John Smith 1108/28/1979G9A-5P - (30 GROC)C61CB100S/SLIFT
13400John Smith 1209/18/1979P10A-8P - (61 PERISH)C65LB202S/SLIFT
14415John Smith 1310/03/1979P10A-6P - (62 PERISH)C65LB303S/SLIFT
15416John Smith 1410/08/1979G9A-5P - (30 GROC)C61C1190S/SJAN
16445John Smith 1511/15/1979G9A-5P - (30 GROC)C61CB100S/SLIFT
17515John Smith 1607/08/1980P10A-8P - (61 PERISH)C65LB201S/SDMG/RCP
18545John Smith 1709/22/1980AP10A-8P - (61 PERISH)C65L0351S/SREC
1980John Smith 1802/02/1981D7A-5P - (02 DAIRY)C65DQ203S/W/SLIFT
2094John Smith 1902/16/1981P10A-8P - (61 PERISH)C65LQ326S/W/SLOAD
21566John Smith 2003/10/1981P10A-8P - (61 PERISH)C65LB102S/SDMG/RCP
Sheet1

Try:
VBA Code:
Sub PopulateNames()
    Application.ScreenUpdating = False
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "S").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    Application.ScreenUpdating = True
End Sub
 
Upvote 1
Your data should look like this:
Book1
ABCDEFGHIJKLMNOPQRS
1NO.EMPLOYEE SEN. DATESEN. ORDERWHSESTART TIMECodeSCHDAYS OFFBIDMando 1Mando 2
2112John Smith 109/08/1970D7A-3P - (00 DAIRY)C65DB202S/SLIFTNameJohn Smith 10NameJohn Smith 17
365John Smith 206/04/1975G9A-5P - (30 GROC)C61C0158S/SLIFTLift Time9:00 PMLift Time10:00 PM
457John Smith 311/22/1976G9A-5P - (30 GROC)C61CB117S/SBAILERDeptC65LDeptC65L
5111John Smith 409/28/1977G9A-5P - (30 GROC)C61C0150S/SREC
6163John Smith 501/29/1978D7A-5P - (07 DAIRY)C65DR204S/TH/SLOAD
7132John Smith 603/19/1978P10A-6P - (62 PERISH)C65LB303S/SLIFT
8285John Smith 705/15/1979G9A-5P - (30 GROC)C61C0151S/SGW
9283John Smith 805/16/1979G9A-5P - (30 GROC)C61C1157S/SGW
10304John Smith 906/12/1979G9A-5P - (30 GROC)C61C1190S/SJAN
11380John Smith 1008/27/1979AP10A-6P - (62 PERISH)C65L1353S/SLIFT
12383John Smith 1108/28/1979G9A-5P - (30 GROC)C61CB100S/SLIFT
13400John Smith 1209/18/1979P10A-8P - (61 PERISH)C65LB202S/SLIFT
14415John Smith 1310/03/1979P10A-6P - (62 PERISH)C65LB303S/SLIFT
15416John Smith 1410/08/1979G9A-5P - (30 GROC)C61C1190S/SJAN
16445John Smith 1511/15/1979G9A-5P - (30 GROC)C61CB100S/SLIFT
17515John Smith 1607/08/1980P10A-8P - (61 PERISH)C65LB201S/SDMG/RCP
18545John Smith 1709/22/1980AP10A-8P - (61 PERISH)C65L0351S/SREC
1980John Smith 1802/02/1981D7A-5P - (02 DAIRY)C65DQ203S/W/SLIFT
2094John Smith 1902/16/1981P10A-8P - (61 PERISH)C65LQ326S/W/SLOAD
21566John Smith 2003/10/1981P10A-8P - (61 PERISH)C65LB102S/SDMG/RCP
Sheet1

Try:
VBA Code:
Sub PopulateNames()
    Application.ScreenUpdating = False
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "S").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    Application.ScreenUpdating = True
End Sub
Thanks mumps, I've tested this on my sample and it seems to work. I'll be testing it on the larger file when I get back in the office this week. Will let you know if any issues.
 
Upvote 0
It appears to be in working order. I adjusted the coding so the names would appear one column to the left of where they were. I tried a scenario with two sets of mando lift times and everyone inside seniority date range was appearing both lists, so that is excellent. I did edit the code to sort both name sections in alphabetical order though. I came up with:

VBA Code:
Option Explicit

Sub PopulateMandoNames()
    Dim last_row As Long
    last_row = Cells(Rows.Count, 5).End(xlUp).Row
    Application.ScreenUpdating = False
    Range("O5", Range("P5").End(xlDown)).ClearContents
    Range("R5", Range("R5").End(xlDown)).ClearContents
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "O").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "R").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "O").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    Range("O5", Range("O5").End(xlDown)).Select
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("O5:O" & last_row), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").Sort
        .SetRange Range("O5", Range("O5").End(xlDown))
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("R5", Range("R5").End(xlDown)).Select
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("R5:R" & last_row), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").Sort
        .SetRange Range("R5", Range("R5").End(xlDown))
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Application.ScreenUpdating = True
   

End Sub
Just want to bold the changes I've done:
Dim last_row As Long
last_row = Cells(Rows.Count, 5).End(xlUp).Row

& also below
Range("O5", Range("O5").End(xlDown)).Select
ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("O5:O" & last_row), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Bids").Sort
.SetRange Range("O5", Range("O5").End(xlDown))
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("R5", Range("R5").End(xlDown)).Select
ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("R5:R" & last_row), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Bids").Sort
.SetRange Range("R5", Range("R5").End(xlDown))
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With


It does the job and sorts the selection as I want, so that's fantastic. I am wondering though if when you or someone else might have time if you could look to see if I have any extra unnecessary coding in the sorting. I am trying to learn how to make concise coding and I do use sections of coding across different macros, so if I can learn more concise ways, then I apply those to any future coding that I do. Thank you so much for your time!
 
Upvote 0
This is a little more concise:
VBA Code:
With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("P5", Range("P" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("P4", Range("P" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("S5", Range("S" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("S4", Range("S" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
 
Upvote 0
Sorry for delay, I noticed something isn't working right after all. First, here is the code I used that is combining your original with the concise coding that alphabetizes:

VBA Code:
Sub PopulateNames()
    Application.ScreenUpdating = False
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "S").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("P5", Range("P" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("P4", Range("P" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("S5", Range("S" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("S4", Range("S" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Application.ScreenUpdating = True
End Sub

I re-sorted my overall list to not be in seniority order but alphabetical order. Ideally, the list needs to be in alpha order, but I think that is what is causing this to not work properly. I apologize, if I had known that would affect things this way, I would have had it sorted that way from the get-go. I wish I could use XL2BB on this machine but it is forbidden to download, so I have to copy and paste. Here is what my full ACTUAL data set looks like:
NO.EMPLOYEESEN. DATESEN. ORDERWHSESTART TIMECodeSCHDAYS OFFBIDMando 1Mando 2
542​
ARNOLD, D10/21/2016AP10A-6P - (62 PERISH)C65LB
301​
S/SLOADNameKOWALSKI, MNameVRBANIC, L
337​
BALCHAK, T03/12/1989G9A-5P - (30 GROC)C61CB
100​
S/SLIFTLift Time
8:00 PM​
Lift Time9:00 PM
415​
BALKO, D10/03/1979P10A-6P - (62 PERISH)C65LB
303​
S/SLIFTDeptC61CDeptC61C
312​
BALOGA, R07/29/1990P10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGWLABRYER, LWALDRON, D
67​
BALON, C03/31/2022AG9A-7P - (34 GROC)C61C
5​
104​
M/T/SGWLASKEY, R
871​
BANASICK, D01/28/2019AP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGWLECHNER, C
500​
BARKLEY, R04/30/1987P10A-6P - (62 PERISH)C65LB
303​
S/SLIFTLONG, D
915​
BASSALY, J01/27/2022EP10A-8P - (78 PERISH)C65LG
324​
T/W/THGWMAGILL, J
346​
BAUGH, J05/03/2023BP10A-6P - (71 PERISH)C65LF
314​
F/SGWMARDIS, J
375​
BAYURA, R03/30/1989G11P-7A - (38 GROC)C61QJ
1​
190​
S/SJANMARINCHAK, A
250​
BELTZ, J09/20/1988P10A-6P - (62 PERISH)C65LB
310​
S/SFR DMG/RCPMCMAHAN, S
699​
BIGGIE, L09/25/2017BP10A-8P - (78 PERISH)C65LG
324​
T/W/THGWMICKINAC, T
812​
BORKOVICH, N05/07/1993P10A-6P - (62 PERISH)C65LB
301​
S/SLOADMOLEK, P
649​
BROWN, H07/29/2021FP11P-7A - (69 PERISH)C67G
1​
354​
S/SFR LIFTNOVAK, D
688​
BROWN, R06/26/2011HG9A-7P - (41 GROC)C61CU
110​
S/T/WGWPARKS, E
111​
BRYNER, D09/28/1977G10P-6A - (36 GROC)C61Q
0​
150​
S/SRECPATTERSON, J
724​
BRYNER, M10/02/1992G11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFTPATTERSON, M
883​
BUCZKO, A10/19/2014IP10A-6P - (62 PERISH)C65LB
311​
S/STRAINERPHILLIPS, T
209​
BURKLEY, B09/28/1981P10A-8P - (61 PERISH)C65LQ
326​
S/W/SLOADPOSPISIL, T
913​
CAMPBELL, J03/04/2019EG9A-7P - (40 GROC)C61CT
109​
S/T/SGWPROVANCE, D
163​
CAMPBELL, S01/29/1978D7A-5P - (07 DAIRY)C65DR
204​
S/TH/SLOADPULIDO, C
113​
CANGCO, D08/19/2021BG9A-7P - (40 GROC)C61CT
109​
S/T/SGWRAUCH, J
897​
CARNES, A03/04/2019CP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGWRENO, A
94​
CERVI, S02/16/1981P10A-8P - (61 PERISH)C65LQ
326​
S/W/SLOADROSADO, X
721​
CHURCHFIELD, J02/26/2018BP11P-7A - (69 PERISH)C67G
1​
355​
S/SGWSEMON, J
826​
CISLO, P10/07/2021EG9A-7P - (34 GROC)C61C
5​
104​
M/T/SGWSHAFFER, H
610​
CLARK, T08/19/1987AG11P-7A - (38 GROC)C61Q
1​
157​
S/SGWSIKORA, M
282​
COBB, T01/11/2023HD7A-3P - (12 DAIRY)C65DD
215​
W/SGWSIMCOKE, B
296​
CONNER ZACHARY,02/01/2023BG9A-5P - (47 GROC)C61CC
118​
T/SGWSMAIL, J
934​
COTTRELL, S02/03/2022ED7A-5P - (01 DAIRY)C65D
3​
205​
TH/F/SGWSMITH, R
472​
COUCH, S06/26/1989D11P-7A - (03 DAIRY)C65S
1​
250​
S/SRECSTAFFORD, J
195​
COX, D06/28/2015AG11P-7A - (38 GROC)C61Q
1​
157​
S/SGWSTEYER, T
436​
CREPPS, C02/15/2021BG9A-7P - (41 GROC)C61CU
110​
S/T/WGWTLUMACK, J
80​
CRIBBS, M02/02/1981D7A-5P - (02 DAIRY)C65DQ
203​
S/W/SLIFTTOBIAS, M
545​
CROWE, T09/22/1980AP10P-6A - (68 PERISH)C67G
0​
351​
S/SRECTRIMMER, L
221​
DAUGHERTY, C10/07/2022AD7A-5P - (06 DAIRY)C65D
5​
209​
M/T/SGWUNDERWOOD, Z
309​
DEAN, E03/01/2023AP10A-6P - (71 PERISH)C65LF
314​
F/SGWVRBANIC, L
916​
DENEZZA, J12/04/1985D7A-5P - (13 DAIRY)C65DJ
216​
S/F/STRAINER
112​
DEPAUL, M09/08/1970D7A-3P - (00 DAIRY)C65DB
202​
S/SLIFT
896​
DEWITT, P10/26/1993P10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
297​
DISKIN, T02/08/2023DP10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
405​
DOLEKARY, R01/25/2021AP10A-8P - (70 PERISH)C65LK
312​
W/F/SGW
470​
DORNIN, B03/22/2021DG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
310​
DOYLE, C03/01/2023DP10A-6P - (71 PERISH)C65LF
314​
F/SGW
773​
DULAK, G07/11/1985G9A-5P - (30 GROC)C61CB
100​
S/SLIFT
879​
DZAMBO, J10/19/2014EP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
219​
EBBERT, C10/07/2022CG9A-7P - (34 GROC)C61C
5​
104​
M/T/SGW
977​
EPPLEY, J09/26/2019DP10A-6P - (62 PERISH)C65LB
304​
S/SFR LIFT
740​
ESLARY, D04/12/1985P11P-7A - (69 PERISH)C67GJ
1​
391​
S/SJAN
171​
FAGAN, C12/11/2022G9A-5P - (48 GROC)C61C
9​
119​
H/SGW
734​
FARALLY, A03/12/2018AG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
951​
FAWCETT, B02/22/2015BD7A-5P - (04 DAIRY)C65DK
208​
W/F/SGW
124​
FERRARI, G05/04/2022P10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
212​
FIRMSTONE, W07/05/1988AG11A-7P - (37 GROC)C61C
8​
152​
S/SLOAD
358​
FULTON, D05/31/2023BP10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
557​
GABORKO, A10/26/1989G11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
508​
GEYER, S06/26/2011EG9A-7P - (33 GROC)C61CR
112​
S/TH/SLIFT
301​
GIBSON, G11/15/1988P10A-8P - (61 PERISH)C65LQ
322​
S/W/SFR LIFT
873​
GIGLIOTTI, T10/19/2014AG9A-7P - (35 GROC)C61C
3​
105​
TH/F/SGW
750​
GIULIANI, C09/16/2021FG9A-7P (46 GROC)C61CG
116​
T/W/THGW
168​
GLASS, J08/04/2013P10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
823​
GOWAN, M10/07/2021GP11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
374​
GREGOR, D10/28/1986AP10A-8P - (70 PERISH)C65LK
312​
W/F/SGW
530​
GRUSKA, J11/24/1991G9A-7P - (35 GROC)C61C
3​
105​
TH/F/SGW
756​
GUTH, B06/04/2018AG9A-7P - (35 GROC)C61C
3​
105​
TH/F/SGW
960​
HAGGERTY, C02/17/2022DG9A-7P - (42 GROC)C61CM
111​
T/F/SGW
207​
HAIR, N08/09/2015AP10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
669​
HALL, N08/05/2021BG9A-5P - (43 GROC)C61CF
113​
F/SGW
285​
HARBAUGH, F05/15/1979G10P-6A - (36 GROC)C61Q
0​
151​
S/SGW
276​
HARRIS, J09/17/1981P11P-7A - (69 PERISH)C67G
1​
352​
S/SDMG/RCP
681​
HARRISON, J07/07/1992D11P-7A - (03 DAIRY)C65S
1​
251​
S/SGW
295​
HARROLD, J11/10/1988BP11P-7A - (69 PERISH)C67G
1​
356​
S/SREC
86​
HASSINGER, N04/02/2020BP10A-8P - (70 PERISH)C65LK
312​
W/F/SGW
277​
HEFT, C01/11/2023AG9A-7P (46 GROC)C61CG
116​
T/W/THGW
274​
HEFT, W08/10/2022AG9A-7P (46 GROC)C61CG
116​
T/W/THGW
383​
HELMAN, D08/28/1979G9A-5P - (30 GROC)C61CB
100​
S/SLIFT
570​
HETHERINGTON, W12/02/2016GP10A-8P - (70 PERISH)C65LK
312​
W/F/SGW
864​
HIXSON, D10/12/2014LG9A-5P - (30 GROC)C61CB
100​
S/SLIFT
725​
HIXSON, L03/01/1988D11P-7A - (03 DAIRY)C65S
1​
251​
S/SGW
256​
HOFFER, G09/27/1988P11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
658​
HOLOMAN, R10/26/1987G9A-5P - (30 GROC)C61CB
100​
S/SLIFT
575​
HOLT, T12/02/2016MP10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
147​
HONSE, M06/08/2022BG9A-5P - (48 GROC)C61C
9​
119​
H/SGW
412​
HORNER, N09/06/2023BG9A-5P - (47 GROC)C61CC
118​
T/SGW
363​
HORVAT, M10/19/1986G11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
482​
HOUSTON, R09/18/2016SP10A-6P - (62 PERISH)C65LB
304​
S/SFR LIFT
55​
HRUTKAY, N03/24/2022DP10A-6P - (75 PERISH)C65LD
319​
W/SGW
234​
HUDEC, R07/09/1986G9A-5P - (30 GROC)C61CB
101​
S/SLOAD
116​
HURLEY, T04/27/2022EP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
139​
HURST, M05/10/2015BG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
891​
JAMISON, J11/02/2014DP10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
373​
JAMISON, T06/05/2016AG11P-7A - (38 GROC)C61QJ
1​
190​
S/SJAN
270​
JEFFERS, D01/11/2023GG9A-5P - (47 GROC)C61CC
118​
T/SGW
95​
JOHNSON, C04/13/2022FG9A-7P (46 GROC)C61CG
116​
T/W/THGW
627​
JOHNSTON, J09/03/1987P11P-7A - (69 PERISH)C67G
1​
356​
S/SREC
74​
JONES, C03/31/2022DP10A-8P - (78 PERISH)C65LG
324​
T/W/THGW
324​
JONES, D12/04/1988P10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
739​
JONES, D10/15/1992BP11P-7A - (69 PERISH)C67GJ
1​
390​
S/SFR JAN
258​
JONES, J10/25/2015AP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
175​
KATONA, T08/03/2020BP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
515​
KELLEY, D07/08/1980D7A-3P - (00 DAIRY)C65DB
201​
S/SDMG/RCP
330​
KERNICKY, M11/10/1981P11P-7A - (69 PERISH)C67G
1​
353​
S/SLIFT
955​
KING, B08/01/2019AP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
912​
KINNICK, D11/18/1985AG9A-7P - (33 GROC)C61CR
107​
S/TH/SLOAD
887​
KITE, B11/02/2014AG9A-7P - (35 GROC)C61C
3​
105​
TH/F/SGW
945​
KLINE, T02/08/2015BG9A-7P - (35 GROC)C61C
3​
105​
TH/F/SGW
621​
KOONTZ, W08/31/1987AP11P-7A - (69 PERISH)C67GJ
1​
391​
S/SJAN
572​
KOTYUHA, D07/08/2021ED7A-5P - (01 DAIRY)C65D
3​
205​
TH/F/SGW
448​
KOWALSKI, M08/28/2016BG9A-7P - (32 GROC)C61C
7​
103​
W/TH/SGW
176​
KUNSA, B08/24/2022DP10A-8P - (78 PERISH)C65LG
324​
T/W/THGW
36​
LABRYER, L03/10/2022BG9A-5P - (43 GROC)C61CF
113​
F/SGW
984​
LAGO, M05/16/1986P10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
736​
LANCASTER, L07/13/2014BP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
326​
LANE, D12/06/1988P11P-7A - (69 PERISH)C67GJ
1​
391​
S/SJAN
566​
LASKEY, R03/10/1981G9A-5P - (30 GROC)C61CB
102​
S/SDMG/RCP
703​
LAUFFER, D01/11/1988G11P-7A - (38 GROC)C61QJ
1​
190​
S/SJAN
603​
LAWVER, J08/07/1987G11P-7A - (38 GROC)C61Q
1​
154​
S/SLOAD
205​
LECHNER, C09/28/2022BG9A-5P - (43 GROC)C61CF
113​
F/SGW
702​
LOCK, R01/04/1988P10A-8P - (66 PERISH)C65L
7​
308​
W/TH/SGW
386​
LOCKE, T04/19/1989D11P-7A - (03 DAIRY)C65S
1​
252​
S/SLIFT
57​
LONG, D11/22/1976G9A-5P - (30 GROC)C61CB
117​
S/SBAILER
501​
LOUCKS, B10/02/2016BG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
715​
LOUGHNER, W04/17/1990P11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
32​
LOWERY, B03/10/2022CP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
884​
LUCARELLI, J01/13/2022DP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
652​
LUCARELLI, M06/26/2011FP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
302​
MAGILL, J02/08/2023CG9A-5P - (48 GROC)C61C
9​
119​
H/SGW
638​
MARDIS, J07/22/2021EG9A-7P - (34 GROC)C61C
5​
104​
M/T/SGW
957​
MARINCHAK, A02/17/2022BG9A-5P - (43 GROC)C61CF
113​
F/SGW
280​
MATSKO, R10/05/1981P11P-7A - (69 PERISH)C67GJ
1​
391​
S/SJAN
65​
MCCLAIN, B06/04/1975G10P-6A - (36 GROC)C61Q
0​
158​
S/SLIFT
118​
MCKINLEY, C04/27/2022FP10A-6P - (71 PERISH)C65LF
314​
F/SGW
349​
MCMAHAN, S05/03/2023DG9A-5P - (48 GROC)C61C
9​
119​
H/SGW
107​
MEHALIK, S03/29/2015BP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
316​
MELLINGER, D11/15/1982D7A-3P - (00 DAIRY)C65DJB
240​
S/SJAN
693​
MELOCCHI, A02/08/1985P11P-7A - (69 PERISH)C67G
1​
353​
S/SLIFT
278​
MEYER, B01/11/2023DD7A-3P - (12 DAIRY)C65DD
215​
W/SGW
854​
MEZEIVTCH, J11/04/2021BP10A-8P - (78 PERISH)C65LG
324​
T/W/THGW
684​
MICKINAC, T01/09/1985G9A-5P - (30 GROC)C61CB
120​
S/SGW
687​
MOLEK, P08/21/2017CG9A-7P - (34 GROC)C61C
5​
104​
M/T/SGW
200​
MOWRY, I09/21/2022BD7A-3P - (11 DAIRY)C65D
2​
214​
S/MGW
842​
MURPHY, A09/10/2018CP10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
450​
NAPLES, J03/13/1984G9A-5P - (30 GROC)C61CJB
140​
S/SJAN
877​
NOVAK, D11/15/1985G9A-5P - (30 GROC)C61CB
120​
S/SGW
376​
OHLER, D01/04/2021CD11P-7A - (03 DAIRY)C65S
1​
251​
S/SGW
648​
PALMER, R10/08/1987P10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
283​
PANICHELLA, M05/16/1979G11P-7A - (38 GROC)C61Q
1​
157​
S/SGW
356​
PARKINSON, A05/31/2023AP10A-6P - (71 PERISH)C65LF
314​
F/SGW
408​
PARKS, E07/31/2016G9A-7P (46 GROC)C61CG
116​
T/W/THGW
399​
PATRICK, R11/19/1986P11P-7A - (69 PERISH)C67G
1​
353​
S/SLIFT
321​
PATTERSON, J03/29/2023DG9A-5P - (48 GROC)C61C
9​
119​
H/SGW
239​
PATTERSON, M10/18/2015AG9A-7P - (40 GROC)C61CT
109​
S/T/SGW
235​
PAWLIKOWSKY, R08/21/1988P10A-6P - (62 PERISH)C65LJB
341​
S/SFR JAN
505​
PEREZ, L04/19/2021DD11P-7A - (03 DAIRY)C65S
1​
252​
S/SLIFT
279​
PERRY, S08/20/1986G9A-5P - (30 GROC)C61CJB
140​
S/SJAN
495​
PETRAS, J09/18/2016CG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
567​
PHILLIPS, T03/11/1981G9A-5P - (30 GROC)C61CB
102​
S/SDMG/RCP
825​
POLOGRUTO, D10/07/2021HD7A-5P - (04 DAIRY)C65DK
208​
W/F/SGW
686​
POSPISIL, T08/19/2021GG9A-7P (46 GROC)C61CG
116​
T/W/THGW
323​
PRIEST, T03/29/2023CP10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
911​
PROVANCE, D11/18/1985BG9A-7P - (50 GROC)C61CJ
122​
S/F/STRAINER
593​
PULIDO, C07/22/2021AG9A-7P - (42 GROC)C61CM
111​
T/F/SGW
416​
RADEBAUGH, W10/08/1979G11P-7A - (38 GROC)C61QJ
1​
190​
S/SJAN
640​
RAUCH, J07/22/2021CG9A-7P (46 GROC)C61CG
116​
T/W/THGW
953​
RAY, L02/22/2015CD7A-5P - (06 DAIRY)C65D
5​
209​
M/T/SGW
432​
REHE, J05/21/1989G10P-6A - (36 GROC)C61Q
0​
151​
S/SGW
445​
RENO, A11/15/1979G9A-5P - (30 GROC)C61CB
100​
S/SLIFT
49​
REYNOLDS, M03/17/2022AP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
304​
RHODES, R06/12/1979G11P-7A - (38 GROC)C61QJ
1​
190​
S/SJAN
314​
RIGGIN, V06/21/1993P11P-7A - (69 PERISH)C67G
1​
354​
S/SFR LIFT
423​
RIVA, H06/20/2021AP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
69​
ROBISON, D03/31/2022BP10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
233​
ROSADO, X10/19/2022AG9A-5P - (43 GROC)C61CF
113​
F/SGW
220​
ROSS, M09/13/2015EG11P-7A - (38 GROC)C61Q
1​
157​
S/SGW
446​
RUDY, K01/18/1982BG11P-7A - (38 GROC)C61Q
1​
155​
S/SREC
780​
RUTKOWSKY, F06/26/2011CP11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
465​
SAIN, N08/28/2016IP10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
186​
SCHARTIGER, D08/17/2020DP11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
453​
SEMAN, J08/28/2016LP10A-8P - (65 PERISH)C65L
6​
307​
T/W/SGW
237​
SEMON, J08/18/1988G9A-7P - (34 GROC)C61C
5​
104​
M/T/SGW
772​
SHAFFER, H07/08/1985AG9A-5P - (30 GROC)C61CB
101​
S/SLOAD
552​
SHAFFER, S07/30/1989G11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
629​
SHIELDS, K02/08/1990P10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
722​
SHUPE, K07/19/1990G11P-7A - (38 GROC)C61Q
1​
157​
S/SGW
704​
SIKORA, M03/19/1990G9A-7P - (40 GROC)C61CT
109​
S/T/SGW
606​
SIMCOKE, B03/07/2014AG9A-7P - (32 GROC)C61C
7​
103​
W/TH/SGW
334​
SKVAREK, B05/22/1992P11P-7A - (69 PERISH)C67G
1​
355​
S/SGW
749​
SLATOSKY, R07/08/1985BP10A-6P - (62 PERISH)C65LJB
340​
S/SJAN
858​
SMAIL, J10/12/2014HG9A-7P - (32 GROC)C61C
7​
103​
W/TH/SGW
876​
SMITH, C01/06/2022AD7A-5P - (01 DAIRY)C65D
3​
205​
TH/F/SGW
637​
SMITH, D09/20/1987P10A-6P - (62 PERISH)C65LB
303​
S/SLIFT
458​
SMITH, R07/07/2013G11A-7P - (37 GROC)C61C
8​
152​
S/SLOAD
642​
STAFFORD, J05/25/2014G9A-7P - (31 GROC)C61C
6​
106​
T/W/SGW
949​
STANGE, D02/17/1986BG11P-7A - (38 GROC)C61Q
1​
161​
S/SDMG/RCP
273​
STEFL, J10/18/1988P11P-7A - (69 PERISH)C67G
1​
354​
S/SFR LIFT
269​
STEPINSKY, J08/12/1986P11P-7A - (69 PERISH)C67G
1​
353​
S/SLIFT
197​
STEYER, A06/28/2015BG11P-7A - (38 GROC)C61Q
1​
156​
S/SLIFT
267​
STEYER, T10/05/1988G11A-7P - (37 GROC)C61C
8​
152​
S/SLOAD
320​
STITELY, S11/30/1988P10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
400​
STOREY, J09/18/1979D7A-3P - (00 DAIRY)C65DB
202​
S/SLIFT
742​
SULLENBERGER, D05/14/1990P10A-6P - (62 PERISH)C65LB
301​
S/SLOAD
434​
TAFT, L01/28/1987P10A-6P - (62 PERISH)C65LJB
340​
S/SJAN
888​
THOMAS, C01/13/2022CD7A-5P - (05 DAIRY)C65DP
206​
S/W/THGW
407​
THOMAS, D06/26/2011DP10A-8P - (66 PERISH)C65L
7​
308​
W/TH/SGW
114​
TLUMACK, J04/12/2015AG9A-7P - (32 GROC)C61C
7​
103​
W/TH/SGW
47​
TOBIAS, M12/09/2019DG9A-7P - (40 GROC)C61CT
109​
S/T/SGW
351​
TRIMMER, L05/10/2023AG9A-5P - (47 GROC)C61CC
118​
T/SGW
380​
TROUT, R08/27/1979AP11P-7A - (69 PERISH)C67G
1​
353​
S/SLIFT
833​
TUCCARELLO, B09/11/1987P10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
341​
UNDERWOOD, Z04/26/2023CG9A-5P - (47 GROC)C61CC
118​
T/SGW
986​
URCH, M10/09/1991P11P-7A - (69 PERISH)C67G
1​
354​
S/SFR LIFT
78​
VALLORANI, J06/23/1986BP10P-6A - (68 PERISH)C67G
0​
350​
S/SGW
605​
VITALBO, J08/12/1987D7A-3P - (00 DAIRY)C65DB
200​
S/SLOAD
204​
VRBANIC, L09/28/2022AG9A-5P - (43 GROC)C61CF
113​
F/SGW
503​
WALDRON, D09/03/1989G9A-5P - (30 GROC)C61CB
100​
S/SLIFT
259​
WALTERS, K10/25/2015EP10A-6P - (62 PERISH)C65LB
304​
S/SFR LIFT
183​
WEAVER, D08/17/2020BP10A-6P - (73 PERISH)C65L
2​
316​
S/MGW
395​
WILSON, W07/10/2016GP10A-8P - (63 PERISH)C65L
3​
305​
TH/F/SGW
840​
WILTROUT, C10/12/2014CG11P-7A - (38 GROC)C61Q
1​
155​
S/SREC
236​
WINGARD, M10/19/2022CD7A-5P - (06 DAIRY)C65D
5​
209​
M/T/SGW
942​
WINGROVE, D06/10/2019CP10A-8P - (64 PERISH)C65L
5​
306​
M/T/SGW
230​
WINGROVE, R08/16/1988P10A-6P - (62 PERISH)C65LB
318​
S/SGW
519​
WINIARSKI, J12/29/2013G11P-7A - (38 GROC)C61Q
1​
155​
S/SREC
421​
WOOD, N08/14/2016BP11P-7A - (69 PERISH)C67G
1​
356​
S/SREC
132​
WOODS, D03/19/1978P10A-6P - (62 PERISH)C65LB
303​
S/SLIFT
244​
YAROSIK, D02/05/1983P10A-6P - (62 PERISH)C65LB
302​
S/SDMG/RCP
581​
YOUNKIN, J02/03/2014D7A-5P - (01 DAIRY)C65D
3​
205​
TH/F/SGW
300​
ZAVAGE, R11/13/1988G11P-7A - (38 GROC)C61QJ
1​
190​
S/SJAN
604​
ZELMORE, B12/07/1989D7A-5P - (05 DAIRY)C65DP
206​
S/W/THGW

In this scenario, I used Kowalski, M for the first mando post time which was 8PM. They started in 8/28/16 and are in the C61C dept. I then have another mando post time for Vrbanic, L. for 9 PM. So this means anyone in the C61C dept. after Kowalski up to and including Vrbanic L their names should appear in the list under the first mando lift time and then anyone in C61C AFTER Vrbanic, L should appear in the second list. Based on that, I would then expect to see:

Mando 1 List
MOLEK, P
GUTH, B
CAMPBELL, J
TOBIAS, M
CREPPS, C
MARDIS, J
PULIDO, C
RAUCH, J
HALL, N
CANGCO, D
POSPISIL, T
GIULIANI, C
CISLO, P
HAGGERTY, C
MARINCHAK, A
LABRYER, L
BALON, C
JOHNSON, C
HONSE, M
HEFT, W
LECHNER, C
VRBANIC, L

All of these people are in the C61C dept. and have seniority dates AFTER Kowalski, M

Mando 2 List
EBBERT, C
ROSADO, X
FAGAN, C
HEFT, C
JEFFERS, D
CONNER ZACHARY,
MAGILL, J
PATTERSON, J
UNDERWOOD, Z
MCMAHAN, S
TRIMMER, L
HORNER, N

All of these people are in the C61C dept. and have seniority dates AFTER Vrbanic, L

In the data I pasted, I was getting people with higher seniority than Kowalski included in the Mando list 1 as you will see above. If it would be easier, I could attach the tab in a PM. Just let me know. Would it be something like incorporating sorting the master list by seniority date in the macro and then sorting back towards the end to alpha maybe? Something utilizing "CurrentRegion" maybe?
 
Last edited:
Upvote 0
I got it. That was it. Sorting by seniority is now included in the macro and that then makes the rest of the macro work properly. Final code(Hopefully):

VBA Code:
Option Explicit

Sub PopulateMandoNames()
    Dim last_row As Long
    last_row = Cells(Rows.Count, 5).End(xlUp).Row
    Application.ScreenUpdating = False
    Range("O5", Range("P5").End(xlDown)).ClearContents
    Range("R5", Range("R5").End(xlDown)).ClearContents
    Range("A1").CurrentRegion.Select
    Range("A2").Activate
    ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort.SortFields.Add2 Key:=Range( _
        "C2:C" & last_row), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortTextAsNumbers
    ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort.SortFields.Add2 Key:=Range( _
        "D2:D" & last_row), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With

    
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "O").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "R").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "O").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    Range("O5", Range("O5").End(xlDown)).Select
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("O5:O" & last_row), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").Sort
        .SetRange Range("O5", Range("O5").End(xlDown))
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("R5", Range("R5").End(xlDown)).Select
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").Sort.SortFields.Add2 Key:=Range("R5:R" & last_row), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").Sort
        .SetRange Range("R5", Range("R5").End(xlDown))
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    
    Range("A1").CurrentRegion.Select
    Range("A3").Activate
    ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort.SortFields.Add2 Key:=Range( _
        "B2:B" & last_row), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortNormal
    With ActiveWorkbook.Worksheets("Bids").AutoFilter.Sort
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With

    
    Application.ScreenUpdating = True
        

End Sub
 
Upvote 0
Try:
VBA Code:
Sub PopulateNames()
    Application.ScreenUpdating = False
    Dim v As Variant, i As Long, rName As Range, rName2 As Range
    Range("P5", Range("P" & Rows.Count).End(xlUp)).ClearContents
    Range("S5", Range("S" & Rows.Count).End(xlUp)).ClearContents
    Columns("C:C").Select
    Selection.TextToColumns Destination:=Range("C1"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
        Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
        :=Array(1, 3), TrailingMinusNumbers:=True
    Selection.NumberFormat = "mm\/dd\/yyyy"
    Cells(1, 1).Sort Key1:=Columns(3), Order1:=xlAscending, Orientation:=xlTopToBottom, Header:=xlYes
    If Range("S2") = "" Then
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    Else
        Set rName = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1, Range("B" & Rows.Count).End(xlUp)).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("S4") Then
                Cells(Rows.Count, "S").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
        Set rName = Range("B:B").Find(Range("P2"), LookIn:=xlValues, lookat:=xlWhole)
        Set rName2 = Range("B:B").Find(Range("S2"), LookIn:=xlValues, lookat:=xlWhole)
        v = Range("B" & rName.Row + 1 & ":B" & rName2.Row).Resize(, 6).Value
        For i = LBound(v) To UBound(v)
            If v(i, 6) = Range("P4") Then
                Cells(Rows.Count, "P").End(xlUp).Offset(1) = v(i, 1)
            End If
        Next i
    End If
    With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("P5", Range("P" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("P4", Range("P" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    With Sheets("Bids").Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("S5", Range("S" & Rows.Count).End(xlUp)), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("S4", Range("S" & Rows.Count).End(xlUp))
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Cells(1, 1).Sort Key1:=Columns(2), Order1:=xlAscending, Orientation:=xlTopToBottom, Header:=xlYes
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
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