How to use If Statement or Vlookup when comparing lists of names

Dprobasco

New Member
Joined
Oct 15, 2023
Messages
12
Office Version
  1. 365
Platform
  1. MacOS
I have a spreadsheet with three worksheets

The first worksheet contains a list of 5045 names of people in one column and related individual ID numbers in another column

The second spreadsheet has a list of 345 names of people in a column

The third spreadsheet has a list of 200 names of people in a column

For each of the second and third spreadsheets I want to compare that list to the longer list and when it matches, put the related ID number in the next column.

Which is better to use, the If statement or the Vlookup statement.

How would I use the statement to make it work.

I tried the if statement but ended up with the Spill error message

Dale
 
Thanks for the previous help.

Another question and is similar.

If I have a spreadsheet with a list of just volunteer names in column A and their respective ID number in column B of worksheet one and a list of client and volunteer ID numbers in column A of worksheet 2. How could I have Excel compare the ID numbers in worksheet 2 column A and when it finds a match of ID numbers copy the name of the volunteer with that ID number from worksheet one into column B of worksheet two next to the matched ID number

Dale
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Something like this?

Dprobasco.xlsm
AB
1VolunteerID
2TomID1
3AnnID55
4JenID8
5BobID3
6KenID6
Sheet1


Dprobasco.xlsm
ABC
1ClientIDVolunteer
2Client 3ID3Bob
3Client 8ID8Jen
4Client12ID12Not found
5Client 1ID1Tom
Sheet2
Cell Formulas
RangeFormula
C2:C5C2=XLOOKUP(B2:B5,Sheet1!B2:B6,Sheet1!A2:A6,"Not found")
Dynamic array formulas.
 
Upvote 0
Thank you so much. It is unbelievable how helpful this forum is and how quick everyone responds.

Before you know it I will move from beginner to strong beginner. 😁😁

Thanks.

Dale
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,112
Members
453,021
Latest member
Justyna P

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