Find Last Occurence in a Range with VBA

J

jlclyde

I am using find to get the first address of occurences in a row, but
how do you get the last occurence?

Thanks,
Jay
 
B

Bernie Deitrick

Jay,

Dim myC As Range
Set myC = Range("A2:A100").Find("Jay", , , , , xlPrevious)
MsgBox myC.Address

HTH,
Bernie
MS Excel MVP
 
J

jlclyde

Jay,

Dim myC As Range
Set myC = Range("A2:A100").Find("Jay", , , , , xlPrevious)
MsgBox myC.Address

HTH,
Bernie
MS Excel MVP







- Show quoted text -

This was not what I was thinking but this will do nicely.
Thanks,
Jay
 
Top