Dynamic array to replace pivot table (sorting problem)

Noneto

New Member
Joined
Jun 25, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello Excel comunity,

I started playing with dynamic arrays to replace PivotTables. It s working well but I am struggling to order the data in the way I need.
I wonder if is possible to make this Dynamic Array table without using the Auxiliar Table.

Here is an example:

1624666365574.png


Formulas:
1)=UNIQUE(Data[Customer])
2)=SUMIF(Data[Customer],D4#,Data[Amount])

3)=SORTBY(D4#,E4#,-1)
4)=SUMIF(Data[Customer],D14#,Data[Amount])

Thanks,
Nicolas.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
did you try SORT formula?

with :
1624682446338.png

1, put ur whole table in.
2. select by which column from ur table you want to sort.
3. ascending or descending

I wonder if is possible to make this Dynamic Array table without using the Auxiliar Table.
kinda, select whole table and press f9, then enter
 
Upvote 0
did you try SORT formula?

with :
View attachment 41631
1, put ur whole table in.
2. select by which column from ur table you want to sort.
3. ascending or descending


kinda, select whole table and press f9, then enter
Thanks for your comment.

I am using that formula in the final table already.
The problem is that I can't avoid creating the AUX table first to Combine and sum the rows with the same customer name.
 
Upvote 0
Try this. Column G formula provided as a marginally shorter version of the col D formula if you have the LET function.

Noneto.xlsm
ABCDEFGH
1
2
3CustomerAmount
4Customer142Customer4709Customer4709
5Customer2487Customer2487Customer2487
6Customer1312Customer5432Customer5432
7Customer4653Customer7423Customer7423
8Customer5432Customer1354Customer1354
9Customer431
10Customer7423
11Customer425
12
Sheet1
Cell Formulas
RangeFormula
D4:D8D4=SORTBY(UNIQUE(Data[Customer]),SUMIF(Data[Customer],UNIQUE(Data[Customer]),Data[Amount]),-1)
E4:E8,H4:H8E4=SUMIF(Data[Customer],D4#,Data[Amount])
G4:G8G4=LET(cust,Data[Customer],uc,UNIQUE(cust),SORTBY(uc,SUMIF(cust,uc,Data[Amount]),-1))
Dynamic array formulas.
 
Upvote 0
Solution
Try this. Column G formula provided as a marginally shorter version of the col D formula if you have the LET function.

Noneto.xlsm
ABCDEFGH
1
2
3CustomerAmount
4Customer142Customer4709Customer4709
5Customer2487Customer2487Customer2487
6Customer1312Customer5432Customer5432
7Customer4653Customer7423Customer7423
8Customer5432Customer1354Customer1354
9Customer431
10Customer7423
11Customer425
12
Sheet1
Cell Formulas
RangeFormula
D4:D8D4=SORTBY(UNIQUE(Data[Customer]),SUMIF(Data[Customer],UNIQUE(Data[Customer]),Data[Amount]),-1)
E4:E8,H4:H8E4=SUMIF(Data[Customer],D4#,Data[Amount])
G4:G8G4=LET(cust,Data[Customer],uc,UNIQUE(cust),SORTBY(uc,SUMIF(cust,uc,Data[Amount]),-1))
Dynamic array formulas.
Thanks A LOT. You not only found the solution, you found 2 ways to do it.

:)
 
Upvote 0
For future reference

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: https://www.excelforum.com/excel-ge...y-to-replace-pivot-table-sorting-problem.html
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
For future reference

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Dynamic array to replace pivot table (sorting problem) [SOLVED]
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Got It. Thanks for letting me know.
 
Upvote 0

Forum statistics

Threads
1,215,474
Messages
6,125,026
Members
449,204
Latest member
LKN2GO

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