+ Reply to Thread
Results 1 to 4 of 4

VBA to find last instance of a match?

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    VBA to find last instance of a match?

    So I'm trying to use VBA to find the last instance of a match. I have an array lookup formula that does the trick, but it takes a really long time to calculate:

    Please Login or Register  to view this content.
    Is there a way to accomplish this via VBA that is quicker? Or another formula that may not use as many resources?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: VBA to find last instance of a match?

    You would have to supply additional details if this is in an open workbook, closed workbook.

    To find the last string in column J and get the result from column P would be:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: VBA to find last instance of a match?

    Quote Originally Posted by davesexcel View Post
    You would have to supply additional details if this is in an open workbook, closed workbook.

    To find the last string in column J and get the result from column P would be:

    Please Login or Register  to view this content.
    Thank you! So I got something that works:

    Please Login or Register  to view this content.
    I just brought in my data from the other workbook to sheet 2 to just test real quick, but I am intrigued on if this would be possible with a closed workbook? I think I would know how to do it by opening the other workbook, and then assigning it as a variable and then referring to that sheet for the search range.

    But just curious for my Excel VBA knowledge on if it would be possible on a closed workbook as well.

    Thanks for the help!

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: VBA to find last instance of a match?

    No, I was just wondering because your formula had a wb name in it.

+ 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. Replies: 4
    Last Post: 04-07-2017, 01:59 PM
  2. [SOLVED] Index/ Match Last Instance
    By Burt_100 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-29-2015, 12:05 AM
  3. Find and add every instance of a value
    By tapsmiled in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-11-2015, 10:08 AM
  4. [SOLVED] To Find every instance of TEXT copy, repeat until no Find found
    By DadaaP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2013, 02:15 PM
  5. find 2nd instance of a duplicated value in an index/match formula?
    By Bobbo Jones in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 06-14-2013, 09:42 AM
  6. [SOLVED] Index / Match to find next instance of a value
    By boylers75 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-10-2012, 10:06 AM
  7. Find&Copy only copying 1 instance of match
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-14-2010, 10:55 AM

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