assigning number ID's to each unique value on a list

jacinthn

Board Regular
Joined
Jun 15, 2010
Messages
96
I have no idea where to start with this. I have 2 list of names one for managers and one for the employees under them. I need to automatically assign a ID or number value to each name "this is being ran within another macro" So that i can do a vlookup on column b of the managers list and return the assign numbers in a list of employees with duplicates

does anyone know how i can automatically assign a number value to the first list. the first cell of data is always blank so if there was a way to tell the macro to start assighing at the first non blank adjacent cell, i might be able to just manually add a 1 and copy down

Thanks

List of managers
Bob 1
Peter 2
Angela 3
Frank 4
Justin 5

Jennifer Bob
Brian Peter
David Bob
Natasha Frank
Jeff Angela
Maria Angela
Kevin Justin
Antoinette Frank
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I Do have another question does it make more sence to do a v look up for this than an If statement ?

=IF(I3="P3:P7",Q,"")

If the manager name in column I3 matches any from the range P3: P7 return the value from Q,
it seems to work better as a vlookup, but i wanted to see if i could do it as a IF statement
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,539
Latest member
alex78

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