sum if it match the column criteria

G

Guest

Hello,
col A1 thru F1 has following codes
1,5,7,8,4,9

Col a2 thru F2 has 10,15,25,50,55,60 values

col G, H & I need a formula where col G would add the value based on code 1
& 9, Col H would add the value based on code 5 & 8 and col I would add the
value based on code 7 & 4.

Thanks for the soultion.

Dinesh
 
G

Guest

Hello,

Just to add few comments.
sometime this codes changes columns and some time one or two code may not
appear. So looking for consistent formula where it works in different
scenarios.

Thanks.

Dinesh
 
T

T. Valko

Try these:

For col G:

=SUM(SUMIF(A1:F1,{1,9},A2:F2))

For col H:

=SUM(SUMIF(A1:F1,{5,8},A2:F2))

For col I:

=SUM(SUMIF(A1:F1,{7,4},A2:F2))

Biff
 
G

Guest

Thanks Biff. Perfect.

T. Valko said:
Try these:

For col G:

=SUM(SUMIF(A1:F1,{1,9},A2:F2))

For col H:

=SUM(SUMIF(A1:F1,{5,8},A2:F2))

For col I:

=SUM(SUMIF(A1:F1,{7,4},A2:F2))

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vendor matches 6
sum by rows in Pivot 1
Conditional Multiply and Sum 2
sorting array formula 2
match and extract 4
IF and OR Function 3
Match with 3 criteria 3
Loop Through Text and Test for Scenarios Q 31

Top