Using macro or other function

O

orquidea

Hi

I want to add the values of column A in 2 groups. One total would be adding
the values of the rows that have 20 on the column B and other total would be
adding the values which have 40 on the column B. The result should be 20 -
13 and 40 - 88

A B
2 20
1 40
84 40
6 20
3 40
5 20

Could anyone help me with this issue.

Thanks in advance.

Escarly
 
J

John Bundy

Use the SumIf function
=SUMIF(B1:B6,20,A1:A6)
change the 20 to a 40 for the other one
 
Top