SUM ROWS and RETURN DATA AS ARRAY

PaulGotts

New Member
Joined
Nov 5, 2012
Messages
29
Hello there,

I have used MMULT to create an array of values visible in the formula bar when I hit F9.

I want to sum only the rows within these values and be able to see said sum (separated by semi-colons) in the formula bar when I hit F9.

I want to be able to continue to apply further functions to these row summations.

Because there are 3400 rows and possibly 100 columns, it is not feasible (would take too long) to run intermediary steps in 340,000 cells.

If you have a suggestion as to how to attain this I am all ears.

Thanks kindly,
Paul.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hello Paul,

Can you post the formula you are using to create the array?

Sorry for the delay. I ended up being able to solve it using this formula below. MMULT using a column of 1's provided me with what I needed (summed each row and returned an array for further functionality in the same formula).

{=IFERROR(SUM(--(((MMULT(--(MOD(COLUMN(INDEX('Ship vs Scan'!$C$7:$DZV$7,,MATCH($E4,'Ship vs Scan'!$C$7:$DZV$7,0)):OFFSET(INDEX('Ship vs Scan'!$C$7:$DZV$7,,MATCH($E4,'Ship vs Scan'!$C$7:$DZV$7,0)),,MATCH(J$3,'Ship vs Scan'!$C$8:$DZV$8,0)))-COLUMN(INDEX('Ship vs Scan'!$C$7:$DZV$7,,MATCH($E4,'Ship vs Scan'!$C$7:$DZV$7,0)))+0,2)=0)*OFFSET(INDEX('Ship vs Scan'!$C$7:$DZV$7,,MATCH($E4,'Ship vs Scan'!$C$7:$DZV$7,0)),3,,3400,MATCH(J$3,'Ship vs Scan'!$C$8:$DZV$8,0)+1),OFFSET($BN$4,,,MATCH(J$3,'Ship vs Scan'!$C$8:$DZV$8,0)+1)))*(--(('Ship vs Scan'!$B$10:$B$3409)>0)))>0)),"")}
 
Upvote 0
Sorry, a little explanation of this formula would probably be helpful...

I had a set of data which was organized similar to this...

Product1Product2
Week1Week2Week3Week1Week2Week3
UnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSold
Region1Store1000030323435
Store2000010000000
Store3000030323435
Store4000010000000
Region2Store1000030323435
Store2000010000000
Store3000030323435
Store4000010000000

<COLGROUP><COL style="WIDTH: 48pt" span=14 width=64><TBODY>
</TBODY>

ETC.
ETC.
ETC.
|
|
|
V

The formula in the previous post allows me to count the # of Stores (not units) which have shipped (or, with minor edits, scanned) the product at any week up to and including the current week (or week of choice). I wanted to figure out how many stores were shipping the product and compare it to how many stores were scanning the product. This formula works with 3400 stores (rows) worth of data and up to 100 products, each with ~28 weeks of data (column DZV7).
This formula enables the user to avoid "processor hogging" intermediate steps (~500,000 of them) by listing the # of stores in 1 cell/week/product (<=28 formulas per product... much faster).
Basically, the formula is written in such a way that it can be copied right and down and not need changing other than to replace the "+0" with "+1" if Scanned stores are needed [i.e. skipping every other column but starting on the UnitScan column (+1) rather than the UnitShip column (+0)].

Maybe this will help others who have similarly complex problems they need to solve without VBA.

Sorry for any confusion! My best advice would be to study Mr.Excel and Excelisfun YouTube videos for each function you don't know.
Thanks,
Paul.
 
Last edited:
Upvote 0
Properly Formatted Table:

Product1 Product2
Week1Week2Week3Week1Week2Week3
UnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSoldUnitShipUnitSold
Region1Store1000030323435
Store2000010000000
Store3000030323435
Store4000010000000
Region2Store1000030323435
Store2000010000000
Store3000030323435
Store4000010000000

<COLGROUP><COL style="WIDTH: 48pt" span=14 width=64><TBODY>
</TBODY>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,794
Messages
6,126,940
Members
449,349
Latest member
Omer Lutfu Neziroglu

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