Well, first question of mine is does 99775 have any meaning at all in this context? That is, could it be a valid result for at least one row?
Have you looked at the created formula to verify that it appears valid? OH, and does it appear to be an array formula (with {} braces at the start and end of it)?
Or maybe try it this way, and as Gord Dibben said, assumes that column A has entries as far down the sheet as you need to go:
Sub Test2()
Dim lRow As Long
Dim newSize As Long
Range("H3").Select
Selection.FormulaArray = _
"=IF(RC[-7]=R[-1]C[-7],"""",SUMPRODUCT(1*(FREQUENCY(IF(R2C3:RC3=RC3,MATCH(R2C1:RC1,R2C1:RC1,0)),ROW(R2C2:RC2)-ROW(R1C2))>0)))"
lRow = Range("A" & Rows.Count).End(xlUp).Row
newSize = lRow - 2 ' could have written lRow-3+1, but -2 takes care of the +1
Range("H3").Resize(newSize).FillDown
End Sub