+ Reply to Thread
Results 1 to 6 of 6

vba apply index match formula and loop through worklist

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    vba apply index match formula and loop through worklist

    I created an index match formula that is inserted as an array. The formula below works as designed when it is inserted manually into the top of the data and copied down. I need to look up a value for each row independently
    Please Login or Register  to view this content.
    I recorded the code to see how excel would change using an array see below
    Please Login or Register  to view this content.
    I inserted the formula into a loop to insert down to the last row in the code below. In this version, the code inserts and adjusts for each row but does not appear to create an array and work
    Please Login or Register  to view this content.
    I adjusted the code to this version and the array appears to create, but the formula does not adjust for each row and every formula still references the first row. as if they were absolute
    Please Login or Register  to view this content.
    I think I'm close but just dont have it correct I am looking up 2 values in my first worksheet then matching them to 2 values that exist in a common row and then retrieving a different value from the same matching row

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: vba apply index match formula and loop through worklist

    Create the Array Formula in cell H2, as per the second code example. Then copy that formula and paste it into the remaining cells.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Re: vba apply index match formula and loop through worklist

    I would do it as suggested if I was the one that would do this going forward. This will be done by someone less proficient in excel and will have varying row count each time it runs. I was trying to have vba insert the formula based on row length and simplify it

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: vba apply index match formula and loop through worklist

    Untested

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Re: vba apply index match formula and loop through worklist

    TMS The code worked perfect Thanks for the help

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: vba apply index match formula and loop through worklist

    You're welcome.

+ 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. How to apply an Index.Match.Match function to all entries in a Listbox on a User Form
    By jason.drozd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-25-2018, 01:54 AM
  2. [SOLVED] Trying to Loop through an Index/Match Formula
    By PreciousKyo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-04-2015, 03:59 PM
  3. Apply Index Match formular in VBA code
    By Johnathan Fouche in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2014, 05:56 AM
  4. Find first available cell in row 1 and apply index match formula
    By antonio32 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2014, 04:53 AM
  5. how to apply the function for MATCH and INDEX
    By yjohari in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2013, 09:06 AM
  6. Daily Worklist that will reference an ongoing Worklist
    By jhashmore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2011, 05:27 PM
  7. How to Apply a combination of Index & Match Functions
    By bmc1975 in forum Excel General
    Replies: 4
    Last Post: 07-30-2010, 07:56 PM

Tags for this Thread

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