Select and Sum

apw420

New Member
Joined
Oct 21, 2002
Messages
34
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?
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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))
 

IML

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,743
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

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,743
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,328
Members
414,054
Latest member
Sameer50

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

Which adblocker are you using?

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
Top