View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Return position of 2nd, 3rd, ect occurrence of a character in a st

You could nest the find commands, using the result of the first, plus 1, as
the starting point for the next:
=FIND("a",A1,FIND("a",A1)+1) finds the second "a" within cell A2, for
instance.
=FIND("a",A1,FIND("a",A1,FIND("a",A1)+1)+1) finds the third.
Of course, this is subject to Excel's limit of seven levels of nesting.

"jheby" wrote:

the Excel =FIND command returns the position of the first instance of a
string that it finds. Is there any way to find position of the 2nd, 3rd, or
nth occurrence? Using =MID is too messy.