VLOOKUP with other sheet

Murray Brown
Murray Brown used Ask the Experts™
on
Hi. When I use the following VLOOKUP on the same sheet as the range "staff" it works fine.
It doesn't, however, work on a different sheet

=VLOOKUP(A5,staff,6,0)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
it works for me just fine; what error do you get?
and with "other sheet" you mean really just another sheet in the same workbook?
can you upload the file (or a sample where you reproduce the issue)?
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013
Commented:
if on sheet1

=VLOOKUP(A5,Sheet1!staff,6,0)
Most Valuable Expert 2013
Commented:
Agree with AngelIII, works OK for me - you shouldn't need to refer to the sheet for a named range, is the lookup value the same, where is A5?

regards, barry
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
Is the A5 on the same sheet?
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Here is the file. I am trying to do a VLOOKUP on the sheet "Template" that references the Sheet Data1
Scheduler.xls
Most Valuable Expert 2013

Commented:
This formula works for me

=VLOOKUP(A5,staff,4,0)

.....but the names need to match - you have "Anthony" on one sheet (with an "h") and "Antony" (without "h") on the other

regards, barry
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
Also I think the names need to be in order to get correct results
Most Valuable Expert 2013

Commented:
>Also I think the names need to be in order to get correct results

No, that's not correct - VLOOKUP with a 4th argument of FALSE or zero will give you an exact match only - the lookup range doesn't need to be sorted (that only applies when 4th argument of VLOOKUP is TRUE or 1)

The formula used should work OK on the data given, as long as the lookup value finds a match

regards, barry
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks for the help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial