Build A Table By Unpivoting Different List To Get An Exhaustive List Of All The Unique Combinations

ED38

New Member
Joined
Mar 29, 2024
Messages
38
Office Version
  1. 365
Platform
  1. Windows
Hello,
I succeed to build the formula for column G and I but I have an issue with the formula in cell H4. I would like the sequence of 12 cells starting in H4 to be repeated 5 times (nb of countries).
I guess I am not far but trying for 2 hours now...
could you help?

Thanks you

Book6
ABCDEFGHI
1BUILD A TABLE BY UNPIVOTING DIFFERENT LIST TO GET AN EXHAUSTIF LIST OF ALL THE UNIQUE COMBINATIONS
2Count543
3CountryProductDeliveryTABLECountryProductDelivery
4AustraliaAAACloudAustraliaAAACloud
5ChileBBBOff-CloudAustraliaAAAOff-Cloud
6FranceCCCsubAustraliaAAAsub
7JapanDDDAustraliaBBBCloud
8United StatesAustraliaBBBOff-Cloud
9AustraliaBBBsub
10AustraliaCCCCloud
11AustraliaCCCOff-Cloud
12AustraliaCCCsub
13AustraliaDDDCloud
14AustraliaDDDOff-Cloud
15AustraliaDDDsub
16Chile#REF!Cloud
17Chile#REF!Off-Cloud
18Chile#REF!sub
19Chile#REF!Cloud
20Chile#REF!Off-Cloud
21Chile#REF!sub
22Chile#REF!Cloud
23Chile#REF!Off-Cloud
24Chile#REF!sub
25Chile#REF!Cloud
26Chile#REF!Off-Cloud
27Chile#REF!sub
28France#REF!Cloud
29France#REF!Off-Cloud
30France#REF!sub
31France#REF!Cloud
32France#REF!Off-Cloud
33France#REF!sub
34France#REF!Cloud
35France#REF!Off-Cloud
36France#REF!sub
37France#REF!Cloud
38France#REF!Off-Cloud
39France#REF!sub
40Japan#REF!Cloud
41Japan#REF!Off-Cloud
42Japan#REF!sub
43Japan#REF!Cloud
44Japan#REF!Off-Cloud
45Japan#REF!sub
46Japan#REF!Cloud
47Japan#REF!Off-Cloud
48Japan#REF!sub
49Japan#REF!Cloud
50Japan#REF!Off-Cloud
51Japan#REF!sub
52United States#REF!Cloud
53United States#REF!Off-Cloud
54United States#REF!sub
55United States#REF!Cloud
56United States#REF!Off-Cloud
57United States#REF!sub
58United States#REF!Cloud
59United States#REF!Off-Cloud
60United States#REF!sub
61United States#REF!Cloud
62United States#REF!Off-Cloud
63United States#REF!sub
Sheet1
Cell Formulas
RangeFormula
B2:D2B2=COUNTA(B3:B8)-1
G4:G63G4=LET(r,FILTER(OFFSET(B$4,0,0,B2,),OFFSET(B$4,0,0,B2,)<>""),cnt,C2*D2,INDEX(r,SEQUENCE(COUNTA(r) *cnt,,1,1/cnt)))
H4:H63H4=LET(r,FILTER(OFFSET(C$4,0,0,C2,),OFFSET(C$4,0,0,C2,)<>""),cnt,B2*D2,INDEX(r,SEQUENCE(COUNTA(r)*cnt,,1,1/D2)))
I4:I63I4=LET(r,FILTER(OFFSET(D$4,0,0,D2,),OFFSET(D$4,0,0,D2,)<>""),cnt,B2*C2,INDEX(r,MOD(SEQUENCE(COUNTA(r) *cnt,,0),COUNTA(r))+1))
Dynamic array formulas.



EDIT:
by the way would there be a way to do that with a single formula? (for the beauty of the exercice!) ;-)
 
Last edited by a moderator:
Wow! Great, I am going to store it carefully in my library of special formulas.
Very Helpful, very valuable contribution.
Thanks a lot
 
Upvote 0

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