+ Reply to Thread
Results 1 to 5 of 5

Vlookup and named ranges ...

  1. #1
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Vlookup and named ranges ...

    Hi ...
    I've searched but I didn't find.
    I have this spreadsheet to find distances between cities.
    Problem is that a lot of places on Earth share the same name.
    There are Los Angeles's all over the place.

    So to pick the right one, I think I first need to enter the name of the country it resides.
    So in D10 I type USA. Then, in the list of cities, I mark all cities in the US, and name that area USA

    Going back to F10, where a v.lookup function is planned to lookup Los Angeles in the named area by fetching the name of the area from D10. It works when I key the name directly in the formula, but I don't seem to get it to work when trying to use the area name residing in D10.

    Any thoughts?
    See attached image.Image 328.png

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup and named ranges ...

    You probably need INDIRECT

    I'm not familiar with the language of the formula in your picture, so in English it would look like

    =VLOOKUP(E10;INDIRECT(D10);2;FALSE)

  3. #3
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Vlookup and named ranges ... [SOLVED]

    Hehe ...
    You beat me to it ...
    Found it myself too.
    Yes that worked fine.
    Thanks for your time.

    This thread should be marked solved ...
    I don't seem to find out how to ...

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup and named ranges ...

    You're welcome.

  5. #5
    Registered User
    Join Date
    12-23-2013
    Location
    Dublin Ireland
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Vlookup and named ranges ...

    Hi,

    I don't recognise the formula you are creating there, but instead of having Los Angels in a named range called USA, why not get all the cities and append the country so that all the Los Angleses are unique. For example

    Los Angeles USA
    Los Angeles Spain
    Dublin Ireland
    Oslo Norway

    instead of
    Los Angeles
    Los Angeles
    Dublin
    Oslo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IF function to vlookup in named ranges
    By bevc in forum Excel General
    Replies: 1
    Last Post: 05-31-2016, 04:09 AM
  2. VLookup, Named Ranges and IF
    By amthyst826 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2010, 07:14 PM
  3. VLookup and Named Ranges
    By amthyst826 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2010, 07:58 PM
  4. named ranges in VLOOKUP
    By KKop in forum Excel General
    Replies: 3
    Last Post: 04-30-2009, 04:41 AM
  5. Vlookup with Named ranges
    By oakman in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-14-2009, 05:00 PM
  6. VLOOKUP within various named ranges
    By johnnyhall81 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2008, 08:31 AM
  7. Vlookup and named ranges
    By XCubed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2005, 03:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1