@Vlookup Excel 2007

DarrylR

New Member
Joined
Apr 21, 2022
Messages
2
Office Version
  1. 2007
Platform
  1. Windows
First time poster and would appreciate some help. I have a spreadsheet with all zip codes, cities, st, etc for New England and New York. I want to be able to pull data by entering a city name. But cities like Springfield, Albany, etc are in multiple states. So I thought I can use range names for each states date. Ex @vlookup(A2,NY,4) where Albany is entered in A2. That I want the flexibility of entering the state in B2 and use a formula @Vlookup(A2,B2,4) where it searches for Albany in New York but that doesn't work. For the array how do I have it go to a cell and then use the named range identified by what's in that cell? I tried @ABS(B2) but that didn't work. Thanks in advance!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi & welcome to MrExcel.
How about
Excel Formula:
=VLOOKUP(A2,INDIRECT(B2),4,0)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=VLOOKUP(A2,INDIRECT(B2),4,0)
Thank you Fluff. I greatly appreciate the help. I have used excel for years and never stumbled on INDIRECT. Big Thumbs Up!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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