Use this

=SUMIF(D:D,O2&"*",I:I)

and pull formula down