Hi

You could also try SUMIFS

=SUMIFS(J2:J13,D2: D13,"GEN",J2:J13,"<0")