Hi everybody,
I am trying to use the match function... The code is as follows:
Dim matchrng As Range
'some code here that defines sht as well as y
Sheets("Summary").Select
Range("C" & k).Select
matchvalue = ActiveCell.Value
Sheets(sht).Select
Set matchrng = Range(Cells(2, y + 11), Cells(4, y + 11))
Sheets("Summary").Select
Range("D" & k).Select
ActiveCell.FormulaR1C1 = Application.WorksheetFunction.Match(matchvalue, Sheets(sht).Range(matchrng), 0) 'The problem lays in this line
'some more code
I get an error - Runtime error 1004, application-defined or object defined error.
I think that the issues the range (matchrng) since this is the only variable that I can't see what it is when I hover my mouse over it.
What am I missing or doing wrong?
Thanks for any advice 
TL33
Bookmarks