Hello, \nI am tasked with adding employee to manager…these were two different excel sheets. I created a simple 1 sheet<\/p>\n
\n
\n\n
\n
Column 1<\/th>\n
Column 2<\/th>\n
Column 3<\/th>\n
Column 4<\/th>\n<\/tr>\n<\/thead>\n
\n
\n
NAME<\/td>\n
EMPLOYEE<\/td>\n
SUPERVISOR<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
AARON, JASON<\/td>\n
TIME, JUSTIN<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
ABBOTT, LESTER<\/td>\n
JUNIPER, STEPH<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
ACE, JACK<\/td>\n
CATCHER, LUTHER<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
BANKS, MISSY<\/td>\n
LIVELY, DON<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>
Advertisement
so column \n1 is duplicate names (different departments) same person \n2. the employee roster(every employee) \n3. the supervisor of the employee<\/p>\n
Advertisement
what I need is to put the supervisor next to the name in column 1. like below \nadd the supervisor next to the name<\/p>\n
EXAMPLE<\/p>\n
\n
\n\n
\n
Column 1<\/th>\n
Column 2<\/th>\n
Column 3<\/th>\n
Column 4<\/th>\n<\/tr>\n<\/thead>\n
\n
\n
NAME<\/td>\n
SUPERVISOR<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>
if we can just pop these into 2 separate columns that would be ok with me<\/p>\n
I have over 800 entries and most are just duplicate people but I need the employee to match the supervisor in all 800 entries and not all employees used. so I just need the supervisors for the ones in column 1.<\/p>\n
I hope this makes sense.<\/p>\n
p.s. I plan on deleting column 2 and 3 because I will not need the employee and supervisor anymore because I will have cell 1 and 2 and I will move them to a location in the spreadsheet that I need it to go.<\/p>\n
Hello, \nI am tasked with adding employee to manager…these were two different excel sheets. I created a simple 1 sheet<\/p>\n
\n
\n\n
\n
Column 1<\/th>\n
Column 2<\/th>\n
Column 3<\/th>\n
Column 4<\/th>\n<\/tr>\n<\/thead>\n
\n
\n
NAME<\/td>\n
EMPLOYEE<\/td>\n
SUPERVISOR<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
AARON, JASON<\/td>\n
TIME, JUSTIN<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
ABBOTT, LESTER<\/td>\n
JUNIPER, STEPH<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
ACE, JACK<\/td>\n
CATCHER, LUTHER<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
BANKS, MISSY<\/td>\n
LIVELY, DON<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>
so column \n1 is duplicate names (different departments) same person \n2. the employee roster(every employee) \n3. the supervisor of the employee<\/p>\n
what I need is to put the supervisor next to the name in column 1. like below \nadd the supervisor next to the name<\/p>\n
EXAMPLE<\/p>\n
\n
\n\n
\n
Column 1<\/th>\n
Column 2<\/th>\n
Column 3<\/th>\n
Column 4<\/th>\n<\/tr>\n<\/thead>\n
\n
\n
NAME<\/td>\n
SUPERVISOR<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ABLE, JOHN<\/td>\n
DAVIS, JASON<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
ARROW, TOM<\/td>\n
PETERSON, JACK<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n
\n
BLANK, JASON<\/td>\n
CLEAR, THOMAS<\/td>\n
<\/td>\n
<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>
if we can just pop these into 2 separate columns that would be ok with me<\/p>\n
I have over 800 entries and most are just duplicate people but I need the employee to match the supervisor in all 800 entries and not all employees used. so I just need the supervisors for the ones in column 1.<\/p>\n
I hope this makes sense.<\/p>\n
p.s. I plan on deleting column 2 and 3 because I will not need the employee and supervisor anymore because I will have cell 1 and 2 and I will move them to a location in the spreadsheet that I need it to go.<\/p>\n
However, your example doesn’t make sense to me.<\/p>\n
In the first “sheet”, you have three entries for the NAME with the value “ABLE, JOHN”. In your second “sheet”, there are only two. What logic was used to drop one of them? You haven’t explained this.<\/p>","upvoteCount":3,"datePublished":"2025-04-11T20:44:18.631Z","url":"https://community.spiceworks.com/t/matching-supervisor-to-employee/1195764/2","author":{"@type":"Person","name":"phildrew","url":"https://community.spiceworks.com/u/phildrew"}},{"@type":"Answer","text":"
I’d use a VBA dictionary.<\/p>\n
\nSub getEmployeeSpuervisor()\n set obj = createObject(\"Scripting.Dictionary\")\n 'Get a unique list of employees and supervisors.\n for r = 2 to (whatever the last row of column 2 is)\n if not obj.exists(cells(r, 2).value) then obj.add Cells(r, 2).value, Cells(r, 3).value\n next\n \n 'Now match teh supervisor to teh employee in column1\n for r = 2 to (whatever the last row of column 1 is)\n Cells(r, 2) = obj(cells(r,1))\n next r\nEnd Sub\n<\/code><\/pre>\n
I didn’t test that, but it should loop through all the names in column 2 to get a unique list of employees (Key) and supervisors (Value). It then loops through the names in column 1 (key) to get the associated supervisor (Value).<\/p>\n
Even with 900 names it should only take a couple of seconds to run.<\/p>","upvoteCount":0,"datePublished":"2025-04-11T21:34:28.457Z","url":"https://community.spiceworks.com/t/matching-supervisor-to-employee/1195764/3","author":{"@type":"Person","name":"tim-smith","url":"https://community.spiceworks.com/u/tim-smith"}},{"@type":"Answer","text":"