Sumifs with SUM(IF(FREQUENCY(MATCH(... formula

Mexcel73

New Member
Joined
Jun 20, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

I've spent hours today trying to figure this out... I hope someone out there can help. I am trying to integrate a Sumifs formula with SUM(IF(FREQUENCY(MATCH(... formula.

I've included an image of the raw data (set up as a table) and the summary table on a different tab. I would like to use a formula that will do the SUM(IF(FREQUENCY(MATCH(..., but also specify for the date and business type (Professional - Domestic, Professional - Foreign, Amateur - Domestic & Amateur - Foreign).


Statement.png






Summary.png
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
With Excel 365 you can use the FILTER and UNIQUE function.

Book2
ABCD
14/30/20214/30/20224/30/2024
2Professional - Domestic4,651.0499,930.3226,011.16
3Professional - Foreign-17,526.00-
4Amateur - Domestic-6,909.501,423.51
5Amateur - Foreign-1,839.451,984.15
Sheet2
Cell Formulas
RangeFormula
B2:D5B2=SUM(UNIQUE(FILTER(Table1[[sales]:[sales]],(Table1[[Statement Date]:[Statement Date]]=B$1)*(Table1[[License Type]:[License Type]]=$A2),0)))


Book2
ABCD
1Inv #License TypeStatement Datesales
21106955Professional - Domestic4/30/20211,757.20
31160311Professional - Domestic4/30/20212,893.84
41160311Professional - Domestic4/30/20212,893.84
51386588Professional - Domestic4/30/2022260
61388710Professional - Domestic4/30/22224,300.27
71390256Amateur - Domestic4/30/20223,120.00
81322597Professional - Domestic4/30/202213,295.72
91392604Professional - Domestic4/30/202216,499.85
101322604Professional - Domestic4/30/202216,498.85
111392611Professional - Domestic4/30/202215,178.59
121398833Professional - Foreign4/30/2022325.96
131392842Professional - Foreign4/30/20226,714.44
141322849Professional - Foreign4/30/20227,185.04
151392856Professional - Foreign4/30/20223,300.56
161388027Professional - Domestic4/30/202215,152.96
171398476Amateur - Domestic4/30/20221,319.50
18141618Amateur - Foreign4/30/20221,839.45
191422049Amateur - Domestic4/30/2022910
201436733Amateur - Domestic4/30/2022877.5
211488602Amateur - Domestic4/30/2022682.5
221443340Professional - Domestic4/30/202223,044.35
232100323Professional - Domestic4/30/20243,240.37
242101921Professional - Domestic4/30/20247,338.19
252101921Professional - Domestic4/30/20247,338.19
262101921Amateur - Foreign4/30/2024986.67
272102944Amateur - Foreign4/30/2024438.4
282133292Amateur - Foreign4/30/2024559.08
292110657Professional - Domestic4/30/20248,997.60
302110657Professional - Domestic4/30/20248,997.60
312115502Professional - Domestic4/30/20246,435.00
322248428Amateur - Domestic4/30/2024355.88
332125435Amateur - Domestic4/30/20241,067.63
Sheet1
 
Upvote 0
There is an error in the formula I gave above. It was looking at the Sales column and not the Inv# column for duplicates.

The below should work.

Book2
ABCD
14/30/20214/30/20224/30/2024
2Professional - Domestic4,651.0499,930.3226,011.16
3Professional - Foreign0.0017,526.000.00
4Amateur - Domestic0.006,909.501,423.51
5Amateur - Foreign0.001,839.451,984.15
Sheet2
Cell Formulas
RangeFormula
B2:D5B2=SUM(IFERROR(FILTER(UNIQUE(FILTER(Table1,(Table1[[Statement Date]:[Statement Date]]=B$1)*(Table1[[License Type]:[License Type]]=$A2))),{0,0,0,1}),0))


Book2
ABCD
1Inv #License TypeStatement Datesales
21106955Professional - Domestic4/30/20211,757.20
31160311Professional - Domestic4/30/20212,893.84
41160311Professional - Domestic4/30/20212,893.84
51386588Professional - Domestic4/30/2022260
61388710Professional - Domestic4/30/22224,300.27
71390256Amateur - Domestic4/30/20223,120.00
81322597Professional - Domestic4/30/202213,295.72
91392604Professional - Domestic4/30/202216,499.85
101322604Professional - Domestic4/30/202216,498.85
111392611Professional - Domestic4/30/202215,178.59
121398833Professional - Foreign4/30/2022325.96
131392842Professional - Foreign4/30/20226,714.44
141322849Professional - Foreign4/30/20227,185.04
151392856Professional - Foreign4/30/20223,300.56
161388027Professional - Domestic4/30/202215,152.96
171398476Amateur - Domestic4/30/20221,319.50
18141618Amateur - Foreign4/30/20221,839.45
191422049Amateur - Domestic4/30/2022910
201436733Amateur - Domestic4/30/2022877.5
211488602Amateur - Domestic4/30/2022682.5
221443340Professional - Domestic4/30/202223,044.35
232100323Professional - Domestic4/30/20243,240.37
242101921Professional - Domestic4/30/20247,338.19
252101921Professional - Domestic4/30/20247,338.19
262101921Amateur - Foreign4/30/2024986.67
272102944Amateur - Foreign4/30/2024438.4
282133292Amateur - Foreign4/30/2024559.08
292110657Professional - Domestic4/30/20248,997.60
302110657Professional - Domestic4/30/20248,997.60
312115502Professional - Domestic4/30/20246,435.00
322248428Amateur - Domestic4/30/2024355.88
332125435Amateur - Domestic4/30/20241,067.63
Sheet1
 
Upvote 0
Hi AhoyNC,

Amazing! It works! Thank you so much!

Cubist, thank you for your reply as well. I tried your formula also, but the result came back as zero (0). I triple checked it, but same results.
 
Upvote 0
Glad we could help. Thanks for the feedback.

Try changing Cubist formula to:
SUM(TAKE(UNIQUE(FILTER(Table1,(Table1[[Statement Date]:[Statement Date]]=B$1)*(Table1[[License Type]:[License Type]]=$A2),0)),,-1))
You then should be able to drag it across and down rows as needed.

SUM unique with UNIQUE - FILTER.xlsx
ABCD
14/30/20214/30/20224/30/2024
2Professional - Domestic4,651.0499,930.3226,011.16
3Professional - Foreign0.0017,526.000.00
4Amateur - Domestic0.006,909.501,423.51
5Amateur - Foreign0.001,839.451,984.15
Sheet3
Cell Formulas
RangeFormula
B2:D5B2=SUM(TAKE(UNIQUE(FILTER(Table1,(Table1[[Statement Date]:[Statement Date]]=B$1)*(Table1[[License Type]:[License Type]]=$A2),0)),,-1))
 
Upvote 0
Cubist, thank you for your reply as well. I tried your formula also, but the result came back as zero (0). I triple checked it, but same results.
You probably didn't paste the minisheet into cell A1.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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