# Select and Sum

#### apw420

##### New Member
I have a row of data - it's broken down in columns by date, and 3 data groups...
How can I do a sum at the end of the row for each data group?

For example...
Oct 1 Oct 2 Oct 3
A B C A B C A B C
1 3 4 2 5 5 7 7 4

How can I sum just A, just B, or just C at the end of the row?

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
On 2002-10-22 14:40, apw420 wrote:
I have a row of data - it's broken down in columns by date, and 3 data groups...
How can I do a sum at the end of the row for each data group?

For example...
Oct 1 Oct 2 Oct 3
A B C A B C A B C
1 3 4 2 5 5 7 7 4

How can I sum just A, just B, or just C at the end of the row?

You didn't specify any ranges...

=SUMPRODUCT((\$A\$2:\$N\$2="A")*(\$A\$3:\$N\$25))

If you only have one row you need to sum dependant on another row, you could get away with a sumif statement, something along the lines of
=SUMIF(A2:N2,"a",A3:N3)
adjusted to suit your range
This message was edited by IML on 2002-10-22 15:10

IML -

That's the stuff.
Thank you.

AW

Great. Take note for future reference of Aladin's formula. While the sumif would be preferable to
=SUMPRODUCT((\$A\$2:\$C\$2="A")*(\$A\$3:\$C\$3))
his can used on multiple rows, for example,
=SUMPRODUCT((\$A\$2:\$C\$2="A")*(\$A\$3:\$C\$5))
would sum up everything in rows3-5 based on the A being in cell 2

Replies
4
Views
164
Replies
3
Views
188
Replies
1
Views
122
Replies
5
Views
197
Replies
2
Views
59

Threads
1,214,323
Messages
6,118,890
Members
448,854
Latest member
Eduard_Stoo

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back