View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Hari Prasadh[_2_] Hari Prasadh[_2_] is offline
external usenet poster
 
Posts: 83
Default Error Handling with a Match Function.

Hi Tom,

I forgot to ask you this.

In the First reply of yours to this question you had mentioned that I dont
need error handling to do what I want

application match returns an error testable by iserror if you don't use the
worksheetfunction qualifier.


I accordingly changed it but forgot to ask you the essential difference
between Application.worksheetfunction.match and Application.Match. Why is it
that in the later case one doesnt get an error. (I consulted help --
Application Property , WorksheetFunction Object, WorksheetFunction Object
but it went above my head)


Actually I wrote a code

If Cells(z, qupcode + 3) = "" Then
Exit For
ElseIf Not (IsError(Application.worksheetfunction.Find("=", Cells(z,
qupcode + 3)))) Then
ActiveCell.Formula = "'= if( " & "&" & Cells(1, 2) & " = " &
Cells(z, "b") & " )" & ThisWorkbook.Sheets(lookingupsheetname).Cells(qupc ode
+ 1, "A") & " = " & Cells(z, "d")
Else
ActiveCell.Formula = "'= if( " & "&" & Cells(1, 2) & " = " &
Cells(z, "b") & " )" & Cells(z, "d")
End If

And the code was blanking out at the point when it couldnt find a -- "=" --
and then I remembered your first post regarding not using worskheetfunction
qualifier. And when i changed it to -- Application.Find -- things were
smooth.

If possible please throw some light on the same.

Thanks a lot,
Hari
India