Does anyone know the code to emulate this function using a custom VBA function:
=INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
TIA.
Does anyone know the code to emulate this function using a custom VBA function:
=INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
TIA.
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" <SpencerHutton@discussions.microsoft.com> wrote in message
news:19455CE9-1E6F-432A-A1DD-1E53CAB21909@microsoft.com...
> Does anyone know the code to emulate this function using a custom VBA
function:
>
> =INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
>
> TIA.
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" <SpencerHutton@discussions.microsoft.com> wrote in message
news:19455CE9-1E6F-432A-A1DD-1E53CAB21909@microsoft.com...
> Does anyone know the code to emulate this function using a custom VBA
> function:
>
> =INDEX(ReturnRange(MATCH(MatchValue,LookupRange,0))
>
> TIA.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks