<hjopertham@yahoo.co.uk> wrote...
....
>Column A is a helper range (optional). Column D contains strings of
>numbers and/or characters.
>
>I wish to search only Column D for the occurrences of "2_34a". What I
>would like is a formula to list how many cells back each duplicate
>occurred from each other.

....
>In this case "2_34a" last appeared 3, 6, 4, 1 cells away. So the
>formula would return 3 6 4 1.
>
>I can achieve the above using 4 clunky formulas, but is there 1
>superformula that could do this. Since I wish to use the formula on
>numerous worksheets/workbooks.


If you really want a single long, complicated, obnoxious formula, you could
use the array formula

=IF(ROW(Data)-CELL("Row",Data)<COUNTIF(Data,"2_34a"),
SMALL(IF(Data="2_34a",ROW(Data),""),
ROW(INDIRECT("1:"&COUNTIF(Data,"2_34a"))))
-IF(ROW(INDIRECT("1:"&COUNTIF(Data,"2_34a")))>1,
SMALL(IF(Data="2_34a",ROW(Data),""),
ROW(INDIRECT("1:"&COUNTIF(Data,"2_34a")))-1),
CELL("Row",Data)-1),"")

If your results started in cell F3 and followed in subsequent rows, it'd be
more elegant and efficient to use

F3:
=MATCH("2_34a",Data,0)

F4:
=IF(ROW()-ROW($F$3)<COUNTIF(Data,"2_34a"),
MATCH("2_34a",OFFSET(Data,SUM($F$3:$F3),0),0),"")

Fill F4 down as needed. This would also be more recalc speed efficient than
VBA due to the unavoidable Excel/VBA interface.