+ Reply to Thread
Results 1 to 2 of 2

Application.Index & Match nested within a loop

  1. #1
    Registered User
    Join Date
    04-13-2012
    Location
    Newcastle, England
    MS-Off Ver
    Excel 2003
    Posts
    29

    Application.Index & Match nested within a loop

    Hi all,

    I'm trying to adapt a macro. I have a basic index/ match lookup from one worksheet to another. It returns the value by each column. Example below:

    Please Login or Register  to view this content.
    What I'm trying to do is put this within a loop. As the loop counts through the columns, the column index will change. I was trying different variations like this but I'm missing something:

    Please Login or Register  to view this content.
    If there's an answer, I'm sure it's easy and I'm missing something.

    Any help gladly appreciated.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Application.Index & Match nested within a loop

    Hi Homeslice-
    1) Move your Dim out of the loop, it's only needed once.
    2) i needs to start at 1, you can't enumerate Column 0
    3) Add Set to the assignment statement for AnyColumn.
    Please Login or Register  to view this content.
    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Last edited by leelnich; 06-02-2017 at 02:38 AM.

+ 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 nested index match
    By trinialaskan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-29-2016, 10:39 AM
  2. [SOLVED] Nested If Statements or Match/Index???
    By djbcktt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2014, 12:57 AM
  3. [SOLVED] Nested Index Match
    By Knawl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2014, 07:39 AM
  4. [SOLVED] 3 Nested IF INDEX MATCH
    By JonesZoid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2014, 10:56 AM
  5. nested if statement with index and match within
    By darkowen in forum Excel General
    Replies: 3
    Last Post: 02-01-2012, 02:02 AM
  6. Nested Match(index()) vs. Match() array formula.
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 07:57 AM
  7. Nested IF (index and match)
    By mikera in forum Excel General
    Replies: 2
    Last Post: 01-21-2010, 11:27 AM

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