Is it possible to combine Filter and Sum?

jakeman

Active Member
Joined
Apr 29, 2008
Messages
325
Office Version
  1. 365
Platform
  1. Windows
I have been working on function that will create a unique list of values that sum the amounts for each value.

For example:

Ctr CodeDateAmount
0011/2/2355.00
0021/15/2312.75
0011/21/2338.22
0021/23/23100.01

What I would like to do is create a unique list of Ctr Codes that would read as follows:

Ctr CodeAmount
00193.22
002112.76

I'm stuck on how to combine filter function which filter on certain dates and the sum function which would add the Amount field together.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Do you want something like?

Book16
ABCDEFG
1Ctr CodeDateAmount
211/2/202355193.22
321/15/202312.752112.76
411/21/202338.22
521/23/2023100.01
6
Sheet1
Cell Formulas
RangeFormula
F2:F3F2=SUM(FILTER($C$2:$C$5,$A$2:$A$5=E2,""))
 
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’)
 
Upvote 0
Do you want something like?

Book16
ABCDEFG
1Ctr CodeDateAmount
211/2/202355193.22
321/15/202312.752112.76
411/21/202338.22
521/23/2023100.01
6
Sheet1
Cell Formulas
RangeFormula
F2:F3F2=SUM(FILTER($C$2:$C$5,$A$2:$A$5=E2,""))
Hi Sufiyan - I appreciate your attempt.

So this isn't exactly what I need. My desired solution is to return an array that has summed on the Ctr Code and shows the total amount next to the Ctr Code, all within the same array.
 
Upvote 0
How about
Fluff.xlsm
ABCDEF
1Ctr CodeDateAmount
2102/01/202355193.22
3215/01/202312.752112.76
4121/01/202338.22
5223/01/2023100.01
6
Lists
Cell Formulas
RangeFormula
E2:F3E2=LET(u,UNIQUE(FILTER(A2:A100,A2:A100<>"")),HSTACK(u,SUMIFS(C:C,A:A,u)))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,530
Messages
6,125,353
Members
449,220
Latest member
Edwin_SVRZ

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