Thread: String Function
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default String Function

On 3 Feb 2005 15:37:59 -0800, "Harlan Grove" wrote:
or for the N_th instance
Dim i As Long, p As Long
For i = 1 To N
p = InStr(p + 1, s, c)
if p = 0 Then Exit For
Next i


Hi, Harlan:

Where and how are you intending to set the function return value? After the
"Next i" statement, if i < N + 1, then there was no Nth occurrence, right?

Myrna