Multiple Array Sum

Silvo

New Member
Joined
May 10, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I am looking for a way to add multiple arrays of a consistent row and column size, based on varying criteria that controls the row and columns forming the array. I'm trying to distribute some costs over different unit types and tenures based on 3 criteria that generate the arrays.

This is an example of the sort of data I want to manipulate:
CostValueTenureTypeMultiple
Item_1558,700C1_P1R1_P1R2_P2
Item_2886,100C1_P2R1_P4R2_P4
Item_3619,300C1_P2R1_P5R2_P5
Item_4883,100C1_P5R1_P7R2_P1
Item_5204,800C1_P4R1_P2R2_P2
Item_6847,200C1_P5R1_P6R2_P5
Item_7941,200C1_P7R1_P2R2_P2
Item_8555,400C1_P1R1_P2R2_P3
Item_9723,800C1_P4R1_P7R2_P2
Item_10416,300C1_P4R1_P7R2_P3
Item_11228,800C1_P1R1_P1R2_P1
Item_12746,000C1_P3R1_P2R2_P3
Item_13427,300C1_P1R1_P3R2_P4
Item_14845,700C1_P4R1_P1R2_P4
Item_15230,800C1_P7R1_P6R2_P4
Item_16613,400C1_P1R1_P1R2_P1
Item_17482,800C1_P1R1_P6R2_P1
Item_1819,600C1_P2R1_P2R2_P2
Item_19504,300C1_P7R1_P7R2_P4
10,734,600


These are the profiles I'm controlling in 3 columns above:
PROFILES
Tenure
RefVWXYZ
C1_P111111
C1_P211
C1_P3111
C1_P41
C1_P51
C1_P61
C1_P71
C1_P81
Type
RefABCDEFGHI
R1_P1111111111
R1_P211
R1_P3111
R1_P411
R1_P511
R1_P6111111
R1_P7111
Multiple
RefABCDEFGHI
R2_P1111111111
R2_P24548656872858692103
R2_P3145,500156,000204,000212,000223,000256,000257,500267,500288,000
R2_P431,50032,60042,30043,50045,40053,10052,90055,20059,200
R2_P5223345578


Then the above profiles are used to multiply against the quantities below:
QUANTITY
Tenure
TypeVWXYZ
A80884
B31236
C68444
D07294
E23369
F33454
G63434
H64651
I21661


I can get it to work by using a helper sheet to expand the arrays (Quantity x Tenure x Type x Multiple) into a percentage and then multiply by Value and add back together. This works fine, except I need to do it hundreds of times and then it becomes difficult to manage.

Item_136003603601802.6%0.0%2.6%2.6%1.3%14,544014,54414,5447,272
14448961442881.0%0.3%0.7%1.0%2.1%5,8181,9393,8785,81811,635
3905202602602602.8%3.8%1.9%1.9%1.9%15,75621,00810,50410,50410,504
04761366122720.0%3.4%1.0%4.4%2.0%019,2315,49424,72510,989
1442162164326481.0%1.6%1.6%3.1%4.7%5,8188,7278,72717,45326,180
2552553404253401.8%1.8%2.5%3.1%2.5%10,30210,30213,73617,17013,736
5162583442583443.7%1.9%2.5%1.9%2.5%20,84710,42313,89810,42313,898
552368552460924.0%2.7%4.0%3.3%0.7%22,30114,86722,30118,5843,717
2061036186181031.5%0.7%4.5%4.5%0.7%8,3234,16124,96824,9684,161
Item_2000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
15930015930000020.0%20.0%0.0%0.0%0.0%177,621177,621000
31740015870000039.9%20.0%0.0%0.0%0.0%353,905176,952000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
Item_3000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
422800044.7%29.8%0.0%0.0%0.0%276,709184,472000
16800017.0%8.5%0.0%0.0%0.0%105,41352,706000
Item_4000000.0%0.0%0.0%0.0%0.0%00000
010000.0%20.0%0.0%0.0%0.0%0176,620000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
030000.0%60.0%0.0%0.0%0.0%0529,860000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
010000.0%20.0%0.0%0.0%0.0%0176,620000
Item_5360000071.4%0.0%0.0%0.0%0.0%146,2860000
144000028.6%0.0%0.0%0.0%0.0%58,5140000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
Item_6000000.0%0.0%0.0%0.0%0.0%00000
000000.0%0.0%0.0%0.0%0.0%00000
0240000.0%24.0%0.0%0.0%0.0%0203,328000
0210000.0%21.0%0.0%0.0%0.0%0177,912000
0120000.0%12.0%0.0%0.0%0.0%0101,664000
000000.0%0.0%0.0%0.0%0.0%00000
0150000.0%15.0%0.0%0.0%0.0%0127,080000
0280000.0%28.0%0.0%0.0%0.0%0237,216000
000000.0%0.0%0.0%0.0%0.0%00000


This is the end result I'd like without the helper sheet I'm using above:
Tenure
TypeVWXYZTotal
A468,5700365,7151,076,270182,8572,093,412
B454,029198,18190,028472,600270,0841,484,921
C230,165333,63465,15390,84865,153784,954
D0293,93633,150208,62766,299602,012
E81,377152,65950,995143,357152,984581,371
F765,794731,01231,374225,56631,3741,785,120
G587,376337,95645,23258,02445,2321,073,820
H518,835467,89069,30299,66611,5501,167,243
I563,121237,89751,424300,7328,5711,161,745
Total3,669,2682,753,165802,3732,675,690834,10410,734,600


I can get it to work with the BYCOL or BYROW formulas but I want to be able to further manipulate the data for different scenarios later and I can’t if it’s already been put into totals.

I feel like it should be possible without the helper sheet but I am struggling and was hoping someone might be able to help or point me in the right direction. Not sure this is an easy one for people with VBA skills that I lack.

Really hope that makes sense and appreciate and help offered.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Is anyone able to help me with this please? I'd really like to know if there's a way to do it and it's been driving me mad for a few weeks ?

Do I need to present the above in a different format (I'd not used the XL2BB before) or do I need to expand on anything.

Do I just need to work it by either row or column or on a cell basis rather than trying to manage it in a single array?

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,004
Members
452,374
Latest member
keccles

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