View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default i = row number of last occurance of duplicate string Column A

On Tuesday, November 4, 2014 7:07:51 AM UTC-8, Claus Busch wrote:
Hi Howard,

Am Tue, 4 Nov 2014 06:44:41 -0800 (PST) schrieb L. Howard:

Is there a short answer as to why Application.WorksheetFunction.... does not work?


I don't know. If the syntax is correct I get a Type Mismatch.

But you can also try it with MATCH:

Sub Test()
Dim i As Long, LRow As Long

LRow = Cells(Rows.Count, 1).End(xlUp).Row
With WorksheetFunction
i = .Match("""abc""", Range("A1:A" & LRow), -1)
End With
MsgBox i
End Sub



Regards
Claus B.



Okay, appreciate the info.

Your first suggestion works quite well and I am using it.

Thanks again.

Regards,
Howard