Thread: last occurence
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
fabalicious[_10_] fabalicious[_10_] is offline
external usenet poster
 
Posts: 1
Default last occurence

Public Function LastOcc(Table As Range, Value As Variant)
' Finds the last occurence of a value in the first column

Dim i As Integer

For i = 1 To Table.Rows.Count

If Table.Cells(i, 1) = Value Then
LastOcc = i
End If

Next i

End Functio

--
Message posted from http://www.ExcelForum.com