View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default 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