Re: unable to get match property of WorksheetFunction class
- From: "titus" <titus.dso@xxxxxxxxx>
- Date: 5 Sep 2006 14:40:13 -0700
titus wrote:
I have the following code :
If IsError(Application.WorksheetFunction.Match(cells(x, 1),
Worksheets("Sheet1").Range("A2:A15"), 0)) Then
do this
else
do that
The code works fine when there is a match ( for every cell in column A
of worksheet 2 it finds a match with the range A2:A15 in worksheet 1),
but I get the error 'unable to get match property of WorksheetFunction
class' when there is no match found i.e it gives a #N/A error. I dont
know what this error means. Any ideas ? Thanks
titus
My bad. I searched this group and found the answer. The correct code
is:
If IsError(Application.Match(cells(x, 1),
Worksheets("Sheet1").Range("A2:A15"), 0))
Though I still dont get why application.worksheetfunction.match gave
me the error when it returned #N/A
.
- References:
- Prev by Date: Re: Creating a custom formatting Macro
- Next by Date: Re: Autofill for checkboxes
- Previous by thread: unable to get match property of WorksheetFunction class
- Next by thread: Re: unable to get match property of WorksheetFunction class
- Index(es):
Relevant Pages
|