Sumif???

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

What formula do I need in G2 and H2

Range A1:F1 is yes or blank
Range A2:F2 is number positive or negative
G2 sum of negative nos where A2:F2 is neg & A1:F1 is yes
H2 sum of positive nos where A2:F2 is pos & A1:F1 is yes

Thanks
 
Hi Steve,

G2:

=SUMPRODUCT((A1:F1="YES")*(A2:F2<0)*A2:F2)

H2:

=SUMPRODUCT((A1:F1="YES")*(A2:F2>0)*A2:F2)

Biff
 
Back
Top