Sum values(column C) based on unique value(column A) after filtering(column B)

liakos

New Member
Joined
Mar 17, 2018
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello everybody,

I need some help creating a formula.
I have an excel file with 3 columns and I need to sum values of column C, based on the unique values of column A.
I achieved that using the formula '=SUMPRODUCT((C3:C13/COUNTIF(A3:A13;A3:A13)))' but when I use filter in column B, the result is not updated.

I attached a picture of a sample spreadsheet.
Could you please help me?

Thanks in advance,
Liakos
 

Attachments

  • test file.JPG
    test file.JPG
    46.4 KB · Views: 9

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.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Hello Fluff, you are right...I did just now. Thanks!
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=SUMPRODUCT((D3:D13=1)*(IFERROR(C3:C13/COUNTIFS(D3:D13,1,A3:A13,A3:A13),0)))
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=SUMPRODUCT((D3:D13=1)*(IFERROR(C3:C13/COUNTIFS(D3:D13,1,A3:A13,A3:A13),0)))
Thanks for your reply.
Using this formula I get zero result. Why do you evolve column D? I am asking because, I cannot understand how this formula works :)
 
Upvote 0
Sorry, forgot to mention you need a helper column in col D with
Excel Formula:
=SUBTOTAL(103,A3)
 
Upvote 0
Can you post some sample data using the XL2BB add-in as it works for me
Fluff.xlsm
ABCD
190
2
3188612201
4188612201
5188614301
6188614301
7188616301
8188659101
9188659101
10188659101
11188659101
12188659101
13188659101
Sheet6
Cell Formulas
RangeFormula
D1D1=SUMPRODUCT((D3:D13=1)*(IFERROR(C3:C13/COUNTIFS(D3:D13,1,A3:A13,A3:A13),0)))
D3:D13D3=SUBTOTAL(103,A3)


Fluff.xlsm
ABCD
130
2
3188612201
4188612201
8188659101
9188659101
10188659101
11188659101
12188659101
13188659101
Sheet6
Cell Formulas
RangeFormula
D1D1=SUMPRODUCT((D3:D13=1)*(IFERROR(C3:C13/COUNTIFS(D3:D13,1,A3:A13,A3:A13),0)))
D3:D4,D8:D13D3=SUBTOTAL(103,A3)
 
Upvote 0
Orders 2024 Jan.XLSX
ABCD
1900
2Shipment NumberOperatorLoading Minutes
3188612A201
4188612A201
5188614B301
6188614B301
7188616D301
8188659C101
9188659C101
10188659C101
11188659C101
12188659C101
13188659C101
Sheet2
Cell Formulas
RangeFormula
C1C1=SUMPRODUCT((C3:C13/COUNTIF(A3:A13,A3:A13)))
D1D1=SUMPRODUCT((D3:D13=1)*(IFERROR(C3:C13/COUNTIFS(D3:D13,1,A3:A13,A3:A13),0)))
D3:D13D3=SUBTOTAL(103,A3)
 
Upvote 0
Odd, that works for me. Try confirming the formula with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,072
Messages
6,122,966
Members
449,094
Latest member
Anshu121

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