Two people with the same name

nilesh patel

New Member
Joined
Jan 30, 2014
Messages
4
I have a simple table which has a person's name and their pay roll number

Name Pay Number

sue 123456
John 23456
Adam 345678
Sue 123456

I am using vlookup to extract peoples pay number by typing in their name.
How do I counteract when two people have the same name.

Thanks
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Welcome to the board.

Perhaps include the Last Name in the table?
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

Or if Pay Number is unique, like an employee number, use that. Then you don't need to worry about two people having the same name.
 

nilesh patel

New Member
Joined
Jan 30, 2014
Messages
4
Welcome to the Board!

Or if Pay Number is unique, like an employee number, use that. Then you don't need to worry about two people having the same name.

My problem is im inputting people's name to retrieve the pay number
I could use first name and surname but I have two employees with the exact same name

Any help would be greatfully appreciated
 

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
need to return more info, like age, skill or location of work to be able to differentiate
 

Watch MrExcel Video

Forum statistics

Threads
1,122,511
Messages
5,596,581
Members
414,079
Latest member
Frills

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