Trying to number some items

New Contributor

So I have a spreadsheet that was created through a data dump from a time clock program. It breaks info out based on user names and  terms ''clocked in'' and ''clocked out''. I had to split the text from a column. So I am trying to assign a number to each line. Column B has the list of user names 2x and column c has the message clocked in and clocked out. So there will be a user name listed 2 times in column b and for each one in column c a corresponding clocked in and clocked out. I am trying to assign each line a unique number so that I can sort those numbers and the rest of the date will sort with it. Currently it is in alphabetical order by user name, but that is not how I need it. I spent forever writing a formula to do this just to get an error something about no more than 64 nest functions. Anyone else have a new better idea on how to accomplish this? The user names will be pretty standard all the time. On any day some will maybe not show, and there will also be additions for new people and deletions for people who leave. I have looked this up and did not find any idea on what to try next.

 

Thank you ahead of time for the help.

1 Reply

@DoogieD 

This might do it. I didn't spill the XLOOKUP so it will be sort friendly:

=LET(lookup,SORT(UNIQUE(UserName)),return,SEQUENCE(ROWS(lookup)),XLOOKUP($D2,lookup,return))