SUMPRODUCT inside Dynamic Array with CHOOSE - impossible?

LuisPulido

New Member
Joined
Apr 27, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi!

So I want to make a Dynamic array with Choose, where one column will be the unique clients and in the second column I want the SUMPRODUCT of Quantity and Price for each product.

As you can see the result is 0 for each row.

This is just an example of my real problem with a report of 200K rows. For this reason I can not add another column (auxiliar column where I multiply Quantity and Product) and use SUMIFS as in this example. Make a pivot table is not an option neither.

I´ve been working on this for two days so I think this is real challenge.

Thanks in advance for your help.

I am open to another formulations. :)

Book1
BCDEFGH
3
4ClientQuantityPrice
5A1923A0
6B1215B0
7C1622C0
8B1311D0
9B2912
10B1514
11D1415
12C2527
13A1621
14C2927
15C1023
16A1830
17D2711
18D2218
19A2311
20A2218
21C2917
22B2017
23A1313
24C1922
Sheet1
Cell Formulas
RangeFormula
G5:H8G5=CHOOSE({1,2}, UNIQUE(B5:B24), SUMPRODUCT( C5:C24, D5:D24, ISNUMBER(MATCH(B5:B24,@UNIQUE(B5:B24),0)) ) )
Dynamic array formulas.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Your formula would need to be
Excel Formula:
=CHOOSE({1,2},UNIQUE(B5:B24),SUMPRODUCT(C5:C24,D5:D24,--(ISNUMBER(MATCH(B5:B24,UNIQUE(B5:B24),0)))))
but that will give you the total sum ie 7206 on each row.
You might be able to do it using offset or mmult, but I have no idea how. You would be better off just using a formula for the distinct values & then use the sumproduct separately.
 
Upvote 0

Forum statistics

Threads
1,223,881
Messages
6,175,159
Members
452,615
Latest member
bogeys2birdies

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