+ Reply to Thread
Results 1 to 3 of 3

Emulate Index/Match combo function w/ VBA custom function

  1. #1
    Spencer Hutton
    Guest

    Emulate Index/Match combo function w/ VBA custom function

    Does anyone know the code to emulate this function using a custom VBA function:

    =INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))

    TIA.

  2. #2
    Bernie Deitrick
    Guest

    Re: Emulate Index/Match combo function w/ VBA custom function

    Spencer,

    For example:

    Dim ReturnRange As Range
    Dim MatchValue As Variant
    Dim LookupRange As Range

    Set ReturnRange = Range("A1:A10")
    MatchValue = 17
    Set LookupRange = Range("B1:B10")

    MsgBox Application.Index(ReturnRange, _
    Application.Match(MatchValue, LookupRange, 0)).Value

    HTH,
    Bernie
    MS Excel MVP


    "Spencer Hutton" <[email protected]> wrote in message
    news:[email protected]...
    > Does anyone know the code to emulate this function using a custom VBA

    function:
    >
    > =INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
    >
    > TIA.




  3. #3
    Niek Otten
    Guest

    Re: Emulate Index/Match combo function w/ VBA custom function

    Maybe the discussion a few lines below this one (Sumif - FastExcel, poster
    Naz) is interesting for you

    --

    Kind Regards,

    Niek Otten

    Microsoft MVP - Excel


    "Spencer Hutton" <[email protected]> wrote in message
    news:[email protected]...
    > Does anyone know the code to emulate this function using a custom VBA
    > function:
    >
    > =INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
    >
    > TIA.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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