I need help getting two "Match" functions (joined with an "And") to work in Excel 2010.
I need to find the row number where two values match. I can get a singular match function to work, but I need both.
The following will work for me correctly:
But I cannot get the following to work:
The last line returns the error:
"Unable to get the Match property of the WorksheetFunction class".
I'm guessing it's a simple syntax issue, could someone help me out with this?
Thanks!
I need to find the row number where two values match. I can get a singular match function to work, but I need both.
The following will work for me correctly:
HTML:
TestVariable = WorksheetFunction.Match("6950", Sheets("Sheet1").Range("C:C"), 0)
But I cannot get the following to work:
HTML:
Test = WorksheetFunction.Match("6950", Sheets("Sheet1").Range("C:C"), 0) and WorksheetFunction.Match("114", Sheets("Sheet1").Range("B:B"), 0)
The last line returns the error:
"Unable to get the Match property of the WorksheetFunction class".
I'm guessing it's a simple syntax issue, could someone help me out with this?
Thanks!