I've been trying to use WorksheetFunction.Match() in my macro to find from a column if the record I am searching for is repeated in the rows after itself using a loop.
sample of my code
For Each rw In rangeGroup
result = Application.WorksheetFunction.Match(rw, Range(rw.Row + 1, rw.End(xlDown)), 0)
Next r2
But i keep getting this error: "Unable to get the Match property of the WorksheetFunction class"
But if i change the range to start from the same row as my search criteria, the program will work.
Is it true that the range must start from the search record in VBScript programming? As I am able to use a Match function in excel itself. Please advise.
Thank you.
yenn
sample of my code
For Each rw In rangeGroup
result = Application.WorksheetFunction.Match(rw, Range(rw.Row + 1, rw.End(xlDown)), 0)
Next r2
But i keep getting this error: "Unable to get the Match property of the WorksheetFunction class"
But if i change the range to start from the same row as my search criteria, the program will work.
Is it true that the range must start from the search record in VBScript programming? As I am able to use a Match function in excel itself. Please advise.
Thank you.
yenn