Group amounts by column using new Dynamic Array functions?

ehans

New Member
Joined
Oct 13, 2015
Messages
6
I am trying to figure out if there is a way to have a "table" automatically generate for me using the new dynamic array functions. I put table in quotes because I know it won't be an Excel table as dynamic array functions don't work in them.

I have a table (real table) with 4 columns:
  • Date
  • Vendor
  • Amount
  • Comment

I have the following function that creates a column of vendor IDs that dynamically expands/contracts based on the date, values in the table, etc.

Code:
=SORT(
    UNIQUE(
        FILTER(tblRoyaltyAccrual[Vendor],(tblRoyaltyAccrual[Vendor]<>"")*(tblRoyaltyAccrual[Date]<=dtCurrentMonthEnd)
        )
    )
)

So as long as the Vendor field isn't blank, and the Date is <= the current month end cell, it creates a list of unique vendor IDs sorted alphabetically. Simple enough.

But now I want a second column that also summarizes the amounts by vendor. I can add the 2nd column to the first argument of the FILTER() function, but then the UNIQUE() function looks at the uniqueness of the vendor+amount, which is pretty much always unique.

What I want is a GROUPBY() type function.

I can do this manually with SUMIFS() but the problem there is when the FILTER() function grows/contracts, the SUMIFS() doesn't.

Any ideas on how to accomplish this? If dynamic array functions worked in tables, this would be a snap. I am ok with a 2nd function in the 2nd column, or a single function that returned 2 columns, but I cannot get anything that works.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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