Dynamic Sum function with filter

Delimaster

New Member
Joined
Apr 17, 2014
Messages
12
I'm trying to come up with a function that will let me search remaining values, filter them from small to largest, and then sum them based on a count reference in another cell.

I can get everything laid out, but i'm not sure how to only sum a range based on another cell value, and exclude blanks.

Any help?
F9eimqT.png
 
This is getting closer, the only issue now is that it removes the duplicates, haha. Basically the inverse of the previous problem. Instead of the list saying:

21,
21,
30,
30,
etc...

It list,
21,
30,
59,
etc..

Thank you very much for the effort so far. Always nice to know I have a lot to learn!
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I may have nailed it finally. Assuming you named M1:M50 as BlanksRange and N1:N50 as NoBlanksRange enter the formula below and again use CTRL+SHIFT+ENTER and drag down

=IF(ROW()-ROW(NoBlanksRange)+1>ROWS(BlanksRange) - COUNTBLANK(BlanksRange),"",INDIRECT(ADDRESS(SMALL((IF(BlanksRange<>"",ROW(BlanksRange),ROW()+ROWS(BlanksRange))),ROW()-ROW(NoBlanksRange)+1),COLUMN(BlanksRange),4)))

Or you could use

=IFERROR(INDEX(BlanksRange,SMALL((IF(LEN(BlanksRange),ROW(INDIRECT("1:"&ROWS(BlanksRange))))),ROW(A7)),1),"")
again use CTRL+SHIFT+ENTER and drag down
 
Last edited:
Upvote 0
Apparently, I'm too stupid to figure out how to copy and paste this thing, because it errors out when I try and correct the ranges.

Can I send you the excel file to play with?
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,000
Members
449,202
Latest member
Pertotal

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