uad
asked on
MS Excel VBA match function for an array
I am trying to build an array to generate a report. The data for the report is stored in various arrays, but when I use the MATCH function I am presented with "unable to get the match property of the WorksheetFunction class. The arrays in the code below are defined as follows:
ReportArray(200,8) and ProdArray(200,2) - the common field in both is ID.
Below is the code generating the error message:
For x = 1 To RptRows
ID = ReportArray(x, 1)
ID_Fnd = WorksheetFunction.Match(ID , ProdArray, 0) ' (error is generated here)
ReportArray(x, 7) = ProdArray(GPN_Fnd, 2)
Next x
ReportArray(200,8) and ProdArray(200,2) - the common field in both is ID.
Below is the code generating the error message:
For x = 1 To RptRows
ID = ReportArray(x, 1)
ID_Fnd = WorksheetFunction.Match(ID
ReportArray(x, 7) = ProdArray(GPN_Fnd, 2)
Next x
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.