Sum an autofiltered column based on a row

swholmes

New Member
Joined
Mar 20, 2011
Messages
3
Greetings all,

I'm stumped trying to do something that I thought would be easy (and hopefully is).

I am using Excel 2002

I have a transaction spreadsheet that list details of a sale:

Name Month Sale
John 8 $25
Adam 8 $30
John 8 $30
John 9 $30

I use an auto filter to select which Month I want and a another worksheet that sums the total sales based on the filter. Now I'd like to show the total sales for each person based on that filter.

Using the example above the output I'm looking for when I filter on Month 8 would be:
Total Sales: $85 (which I can do with subtotal)
John's Sales: $55
Adam's Sales: $30

Any suggestions would be greatly appreciated.

Many thanks,
Scott
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Greetings all,

I'm stumped trying to do something that I thought would be easy (and hopefully is).

I am using Excel 2002

I have a transaction spreadsheet that list details of a sale:

Name Month Sale
John 8 $25
Adam 8 $30
John 8 $30
John 9 $30

I use an auto filter to select which Month I want and a another worksheet that sums the total sales based on the filter. Now I'd like to show the total sales for each person based on that filter.

Using the example above the output I'm looking for when I filter on Month 8 would be:
Total Sales: $85 (which I can do with subtotal)
John's Sales: $55
Adam's Sales: $30

Any suggestions would be greatly appreciated.

Many thanks,
Scott
If you insist having AutoFilter...

A2: John
A3: Adam

B2, copy down:
Code:
=SUMPRODUCT(--($A$5:$A$100=$A2),
    SUBTOTAL(9,OFFSET($C$5,ROW($C$5:$C$100)-ROW($C$5),,1)))
 
Upvote 0
Thank you very much for your help Aladin, it worked!

Would it be possible to sum up all of John's sales regardless of the auto-filter?


Thank you for your time,
Scott
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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
Back
Top