Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2015, 06:08 AM
grexcelman grexcelman is offline Translate INDEX(MATCH) into VBA Windows 7 32bit Translate INDEX(MATCH) into VBA Office 2003
Novice
Translate INDEX(MATCH) into VBA
 
Join Date: Dec 2014
Posts: 21
grexcelman is on a distinguished road
Question 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?
Reply With Quote
  #2  
Old 03-08-2015, 05:06 PM
charlesdh charlesdh is offline Translate INDEX(MATCH) into VBA Windows 7 32bit Translate INDEX(MATCH) into VBA Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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)
Reply With Quote
Reply

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
Translate INDEX(MATCH) into VBA 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft