Hi

Assuming your data is in the range A1:B11 then try

=SUMPRODUCT(--(MID(A2:A11,6,1)="Z"),(B2:B11))
and
=SUMPRODUCT(--(MID(A2:A11,6,1)="B"),(B2:B11))

rylo