Problem with VLOOKUP query

dpbarry

Board Regular
Joined
Feb 10, 2003
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks..

I have a spreadsheet with 121 Pupil Names (in format Surname, Forename) (Column A - sorted alphabetically) and Previous School (Column B).

I have another couple of columns that assist in generating a randomised list of the 121 names and put it in Column E.

All works so far up to this point in that the names are all jumbled up

The teacher then asked me if I could also put the previous school into another Column (F) beside the randomised names so I thought I'd use VLOOKUP and I thought I had it working as it was putting the previous school names in BUT, when I studied closed, some of the school names were correct but some were not and I can't figure out why - probably something simple!!.

Basically I asked it to vlookup the name in the randomised cell with the list in Columns A and return the relevant value in Column B. As I say, some are correct but some aren't.

Could anyone assist in guiding me as to what I'm doing wrong.

Many thanks

Declan
 
Arrrgh!!! Found the problem.

Unfortunately in this day and age, nothing is straight forward with a student's name!!

I couldn't work out why the spreadsheet worked with dummy names but not with the proper data until I further drilled down through the supplied data. As it turns out, 3 students are known legally by one surname but 'prefer' to be known by another surname.

I modified the data and all is now working fine.

My apologies for such a silly oversight but your help was much appreciated

Regards

Declan

Can you give me an actual example? The only possible ways I could see that happening would be if you have duplicate values in the lookup table, or if your lookup values contain wildcard characters like * or ?
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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