Need help on a UDF (Find n occurrence)
Hi experts,
I have one of the “Find n occurrence” UDF long time ago (see below), this function will find the position of the n occurrence of a number from a range then offset it. This work fine but trouble when the range that it look for doesn’t count the cell with different format then return error, you can find it very easy when you open my attachment. Can you help me tweak this UDF a bit so it can neglect the format. Thank you so much for help.
http://www.mediafire.com/download/04yz28xjmxgkxxk/Find+error1.xltm
-----------
Function FINDNTHOCC(range_look As Range, find_it As String, occurrence As Long, offset_row As Long, offset_col As Long)
Dim lCount As Long
Dim rFound As Range
Set rFound = range_look.Cells(1, 1)
For lCount = 1 To occurrence
Set rFound = range_look.Find(find_it, rFound, xlValues, xlWhole)
Next lCount
FINDNTHOCC = rFound.Offset(offset_row, offset_col)
End Function
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago