I am a supporter ofSt. Joseph's hospice. If you find this site useful or if it helped you, consider a small donation toSt. Joseph's, please. Information onSt. Joseph's   Function CountStringCombi(s1 As String, s2 As String, v As Variant) As Variant'Returns array with indices showing how often's1 is followed by instances of s2 in v.'Example: If v includes'ABC'DEF'GHI'GHI'ABC'DEF'ABC'DEF'then CountStringCombi("ABC","DEF",v) will return {3} and'CountStringCombi("DEF","GHI",v) will return {0;1}. Please note that this'function has to be array-entered (enter with CTRL + SHIFT + ENTER).'Reverse("moc.LiborPlus.www") PB V0.2 10-Aug-2009Dim i As Long, hit As Long, maxhit As Long, blFound As Boolean, vP As VariantWith Application.WorksheetFunctionmaxhit = 1vP = .Transpose(.Transpose(v)) 'Range or array - make it sameReDim vR(1 To UBound(vP)) As VariantFor i = 1 To UBound(vP)    Select Case vP(i, 1)    Case s1        blFound = True    Case s2        If blFound Then            hit = hit + 1            GoTo nexti        End If    Case Else        blFound = False    End Select    If hit > 0 Then        vR(hit) = vR(hit) + 1        If hit > maxhit Then maxhit = hit        hit = 0    End Ifnexti:Next iIf hit > 0 Then    vR(hit) = vR(hit) + 1    If hit > maxhit Then maxhit = hit    hit = 0End IfReDim Preserve vR(1 To maxhit) As VariantCountStringCombi = .Transpose(vR)End WithEnd Function