Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Spencer Hutton
 
Posts: n/a
Default 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   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

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" wrote in message
...
Does anyone know the code to emulate this function using a custom VBA

function:

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

TIA.



  #3   Report Post  
Niek Otten
 
Posts: n/a
Default

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" wrote in message
...
Does anyone know the code to emulate this function using a custom VBA
function:

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

TIA.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Function Spencer Hutton Excel Worksheet Functions 2 April 29th 05 08:21 PM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Custom Function not being auto calculated when cells change..help? Alex Wolff Excel Worksheet Functions 4 March 22nd 05 07:06 PM
left worksheet function within a combo box Billing Goddess Excel Worksheet Functions 3 November 15th 04 08:58 PM


All times are GMT +1. The time now is 03:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"