+ Reply to Thread
Results 1 to 6 of 6

VBA Index Match Table Reference

  1. #1
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    VBA Index Match Table Reference

    Hi all,
    I am getting myself crazy with this one as I'm sure I've done it before, but I can't for the life of me workout how to return a value from a table on another worksheet using VBA.

    I have drafted something like this:

    txt_Currency = Application.WorksheetFunction.Index("Supplier[Currency]", Application.WorksheetFunction.Match("name", "Supplier[Supplier]", 0))

    Is there a clean way of returning a value from index matching a table?

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: VBA Index Match Table Reference

    I will move this to the VBA forum for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: VBA Index Match Table Reference

    Got it!

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: VBA Index Match Table Reference

    Ugh! as soon as I use in in a userform it doesn't work >

  5. #5
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: VBA Index Match Table Reference

    ok, now I have it.

    I hope this helps any other frustrated fellows
    HTML Code: 

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA Index Match Table Reference

    A word of advice.

    I'd use Application.Match because when using Worksheetfunction in case of error code goes into debug.

    When using Application you can trap the error by using
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] SUM Cell Reference Using Index/Match
    By safc11 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-09-2019, 11:50 AM
  2. [SOLVED] Using Index Match to match against more than one column, but only reference one row
    By joe978 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-19-2017, 01:35 PM
  3. Absolute Reference in INDEX MATCH?
    By spreadthemsheets in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2017, 02:33 PM
  4. [SOLVED] index/match with named 3d reference
    By stefanp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2016, 11:40 PM
  5. Using index / match to reference a row of data
    By ScottBeatty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2014, 12:49 PM
  6. Index Match Match Formula DOESN'T WORK WITH TABLES/TABLE NAMES ??
    By Underling in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2014, 09:01 PM
  7. Replies: 4
    Last Post: 01-13-2014, 04:16 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