Jan 22 2024 04:02 AM
I’m trying to sort these columns by name but I need the lines for each employee to stay with their associated employee. For example Caleb smith is employee number 1 and the three lines above him are associated with him so if I were to sort alphabetically it throws it off into a weird order. Any help to get this sorted would be much appreciated!
Jan 22 2024 04:29 AM
In a custom sort, you could sort on employee number first, then on material (or another column).
That will keep the rows for each employee together.
Jan 23 2024 06:16 PM - edited Jan 23 2024 06:21 PM
need the lines for each employee to stay with their associated employee.??
Can you share your file with dummy data and expected result?
Jan 24 2024 12:49 AM
@LeeWhitt23 How about adding a calculated column to the table for the employee name? With the help of a separate employee lookup table, you could use the XLOOKUP function to accomplish this. For example:
=XLOOKUP([@[EMP'#/LOCK'#]], tblEmployees[ID], tblEmployees[NAME])
Then sort the table by the calculated "NAME" column from A to Z:
Note: if the XLOOKUP function is not available in your version of Excel, use the INDEX / MATCH equivalent:
=INDEX(tblEmployees[NAME], MATCH([@[EMP'#/LOCK'#]], tblEmployees[ID], 0))
Please see the attached sample workbook...