What is the VBA equivilate to Excel worksheet function lookup
John wrote:
I would like to write code for the following
lookup function.
=Index(AE31;AJ54,MATCH(L3,AE31;AE54),MATCH(M2,AE31 ;AJ31,))
V = [Index(AE31:AJ54,MATCH(L3,AE31:AE54),MATCH(M2,AE31: AJ31,))]
might be considered cheating?
With Range("AE31:AJ54")
V = .Cells(WorksheetFunction.Match(Range("L3"),.Column s(1)), _
WorksheetFunction.Match(Range("M2"),.Rows(1))
End With
is another way.
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
|