Results 1 to 20 of 20

Returning an array of lookup values from an input array, rather than single value

Threaded View

  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    Christchurch, New Zealand
    MS-Off Ver
    Excel 2003, 2010
    Posts
    14

    Returning an array of lookup values from an input array, rather than single value

    Hi there,

    I have a range of values that will be a non-contiguous subset of the header row of a table of data. I need to retrieve an array of data a known offset from the cells that the range of values match.

    I thought the obvious approach was to use HLOOKUP and pass the range in, expecting to have an array of reults returned (CSE):

    {=HLOOKUP(Lookup_Values, Table_of_Data, Offset, 0)}

    This fails as HLOOKUP will only return the first result, not the complete array. The same happens with VLOOKUP.

    My next attempt was to use MATCH, which successfully returns an array of integers, representing the columns that hold the matched headers:

    {=MATCH(Lookup_Values, Table_of_Data,0)} = Array_of_columns, eg {2,4,5,7}.

    From there I thought it would be trivial to build an array of addresses that I could resolve with INDIRECT:

    Address_Array = {"Somesheet!B15", "Somesheet!D15", "Somesheet!E15", "Somesheet!G1"}

    {INDIRECT(Address_Array)}

    This also fails as INDIRECT only returns the first result.

    Any advice on how to solve this, or suggestions for a different approach would be appreciated.

    Cheers, Jason.
    Attached Files Attached Files
    Last edited by jase250; 05-08-2012 at 07:54 AM. Reason: Spelling corrections

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