+ Reply to Thread
Results 1 to 3 of 3

Using arrays alongside INDEX and MATCH

  1. #1
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    Using arrays alongside INDEX and MATCH

    The flow of this macro is to take a value, search for that value within a range, and record the offsetting value of the second row of the specified column.

    The length of each range is the number of cells merged in each respective "FIELD" in row one.

    For example, FIELD A is 3 cells, FIELD B is 3 cells, FIELD C is 2 cells, FIELD D is 4 cells, FIELD E is 2 cells, FIELD F is 4 cells, FIELD G is 24 cells, FIELD H is 9 cells, and FIELD I is 15 cells.

    Starting in column BO, the target value is every other column.

    For example, take the target value in cell BO3 and look inside the range A3:AC3, a match is found in cell C3, and the offsetting same column row 2 value is C - which goes in cell BP3.

    Another example, take the target value in cell BQ3 and look inside the range D3:DF3, a match is found in cell E3, and the offsetting same column row 2 value is E - which goes in cell QR3.

    (note, FIELD B is included twice)

    Another example, take the target value in cell CE3 and look inside the range AQ3:AY3, a match is found in cell AY3, and the offsetting same column row 2 value is AM which goes in cell CF3.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Using arrays alongside INDEX and MATCH

    I think I understand the idea of what you want, but what I don't understand is what range to search on.

    For example if looking at cell BO3, you search the range A3:AC3
    If looking at cell BQ3, you search the range D3:DF3
    If looking at cell CE3, you search the range AQ3:AY3

    What is the logic for the selection of the search range?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    Re: Using arrays alongside INDEX and MATCH

    Each search(look-up value) is to take place within its own range.

    Now, I could have 10 different MATCH/INDEX lines of code, but (if possible) I would like a single (or a few lines) which I'm guessing incorporates an array which redefines the length of the search range.

    Another way to look at this is, each look-up value matches up to a field (the text in row one indicates which field), and the search range for that look-up value is the same field.

+ 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. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  2. Index & Match use with Sumproduct and Arrays.
    By robwebber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2015, 02:24 PM
  3. [SOLVED] Using Max with Index & Match across two arrays of data
    By mike_vr in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-06-2013, 10:34 AM
  4. Index/Match with mulitple arrays
    By Jeannie2006 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2013, 10:56 PM
  5. Sum Index Match Arrays
    By CaesarBob in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2012, 04:38 AM
  6. [SOLVED] Index & Match returning incorrect value. Arrays fixed and exact match used.
    By SDes in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-07-2012, 08:29 PM
  7. MATCH, INDEX and VLOOKUP with Arrays
    By Dean Hinson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2005, 12:06 PM

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