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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

jacinthn

Board Regular
Joined
Jun 15, 2010
Messages
96
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
 

Watch MrExcel Video

Forum statistics

Threads
1,133,575
Messages
5,659,616
Members
418,514
Latest member
radonwilson

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
Top