#1
|
|||
|
|||
Translate INDEX(MATCH) into VBA
Been pounding my head on this one. I have the following function which works fine in excel however the VBA result isn't working for me.
{=INDEX($L$6:$R$19,(MATCH(B7&C7,$M$6:$M$19&$L$6:$L $19,0)),3)} my vba code looks like: Function FTest(tk as string, tk2 as string, Col as integer) test = Application.WorksheetFunction.Index (Sheets("Index_Match").Range("M6:M19"), _ Application.WorksheetFunction.Match(Tk, Sheets("Index_Match") .Range("L6:R13"), 0), Col) Set FTest = test.Value End Function My result is coming back as 0.0 which isn't making much sense since my range of data has all text at the moment. any ideas? |
#2
|
|||
|
|||
Hi,
Perhaps this may help. I found it on line. test = Application.WorksheetFunction.Index(Sheets("Worker s List").Range("C3:C13"), Application.WorksheetFunction.Match(1, Sheets("Workers List").Range("D313"), 0), 1) |
Tags |
index, index/match |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF multiple IFs INDEX-MATCH | grexcelman | Excel Programming | 0 | 02-22-2015 04:20 PM |
Index Match function | jackzha | Excel | 5 | 12-03-2014 12:43 PM |
Index, match in Pivottable and Pivotchart | Newbies | Excel | 0 | 11-15-2014 12:58 AM |
Help with multiple match and index formula | ryanwood | Excel | 1 | 09-12-2012 07:53 AM |
Moving a Index/Match function | FraserKitchell | Excel | 2 | 01-19-2010 09:38 AM |