+ Reply to Thread
Results 1 to 7 of 7

Vlookup on Non Contiguous Named Range

  1. #1
    Registered User
    Join Date
    08-20-2009
    Location
    Kerry, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Vlookup on Non Contiguous Named Range

    Hi everyone,

    I'm trying to do a vlookup on a non contiguous named range.

    I have a non contiguous named Range called "temp".
    Please Login or Register  to view this content.
    I'm trying to perform a vlookup using this range by I'm getting an #N/A error
    Please Login or Register  to view this content.
    Any ideas how this works?
    Thanks.
    Last edited by sflemings; 01-20-2010 at 06:53 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup on Non Contiguous Named Range

    Hi,

    Why not use the contiguous range A1:B7?

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-20-2009
    Location
    Kerry, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Vlookup on Non Contiguous Named Range

    I've considered that but I don't want to do it that way. The reason I'm asking is that I have a range of information in A1:B150 and a second range of information in D1:E150. I don't want to have just one big list A1:B300.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup on Non Contiguous Named Range

    Hi,

    So are you saying your non contiguous ranges that you're trying to use are in both different rows and different columns. Your original post only suggested they were in different rows which was the question I was answering.

    If you're wanting to look in either A or D why not use an If test incorporated with two vlookups. e.g. IF(lookup in A:B=true then lookup A:B, otherwise lookup D:E)

    Rgds

  5. #5
    Registered User
    Join Date
    08-20-2009
    Location
    Kerry, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Vlookup on Non Contiguous Named Range

    Hi Richard,
    My apologies. Yes, my original post contained everything in columns A and B and in different rows. I was using that as an example! I should have said columns AB and DE.
    I was just checking to see if someone knew an easy way to perform a vlookup on multiple ranges. I have tried your suggestion and it works correctly. Thanks.
    Ps. Performing a SUM(temp) actually works fine and handles correctly. There's something with the vlookup that is causing the problem.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Vlookup on Non Contiguous Named Range

    The table_array in a VLOOKUP must be contiguous.

    SUM can work with multiple values, areas etc - eg

    Please Login or Register  to view this content.
    VLOOKUP can not

    Please Login or Register  to view this content.
    The fact that A1:B10,D1:E10 may be a Named range does not alter anything - the Name still evaluates to a non-contiguous range and is thus not viable for use as table_array in a VLOOKUP.

  7. #7
    Registered User
    Join Date
    08-20-2009
    Location
    Kerry, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Vlookup on Non Contiguous Named Range

    That's great. Thanks for that. I thought there might be some limitation on that alright.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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