Sorry, a little explanation of this formula would probably be helpful...
I had a set of data which was organized similar to this...
[TABLE="width: 672"]
<COLGROUP><COL style="WIDTH: 48pt" span=14 width=64><TBODY>[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Product1[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Product2[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Week1[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Week2[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Week3[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Week1[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Week2[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Week3[/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitShip[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]UnitSold[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 64, bgcolor: transparent"]Region1[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Store1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]5[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]5[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 64, bgcolor: transparent"]Region2[/TD]
[TD="class: xl67, width: 64, bgcolor: transparent"]Store1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]5[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]2[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]3[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]5[/TD]
[/TR]
[TR]
[TD="class: xl65, width: 64, bgcolor: transparent"] [/TD]
[TD="class: xl66, width: 64, bgcolor: transparent"]Store4[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]1[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[TD="class: xl68, width: 64, bgcolor: transparent"]0[/TD]
[/TR]
</TBODY>[/TABLE]
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.