ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Select a name from a list of employees using Excel (https://www.excelbanter.com/excel-discussion-misc-queries/3312-select-name-list-employees-using-excel.html)

Tornado

Select a name from a list of employees using Excel
 
I created a macro that extracts soc. sec. # from a list of employees once I
write Last Name of Employee. I used Index & Match commands but my problem is
that employees may share the same last name, even same first name like father
and son. I even tried the VLookup command. How do I go about getting it
right.
Example, If last name is found more than once, then write first name and if
found more than once, write prefix like Jr. or Sr. to distinguish, else write
soc. sec. #.
Thanks in advance.

Bernie Deitrick

Tornado,

Use another column for key data, which could be LastNameFirstNameSuffix and
look up your data based on that.

HTH,
Bernie
MS Excel MVP

"Tornado" wrote in message
...
I created a macro that extracts soc. sec. # from a list of employees once

I
write Last Name of Employee. I used Index & Match commands but my problem

is
that employees may share the same last name, even same first name like

father
and son. I even tried the VLookup command. How do I go about getting it
right.
Example, If last name is found more than once, then write first name and

if
found more than once, write prefix like Jr. or Sr. to distinguish, else

write
soc. sec. #.
Thanks in advance.





All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com