Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings and TIA for your time
I have a worksheet crosstab to sumarise a worksheet database by using Sumproduct formulas. As an exercise, I would like to confine the calculations to memory and finish by transfering the pre-calculated array to a range on the worksheet... Im trying the following approach: From the database, load fields "Title" and "Country" into TitleArray and CountryArray (into memory) From the Crosstab row and column headers, load TitleHeaderArray and CountryHeaderArray into memory. Next, calculate each cell of the CrosstabArray in memory: For i = 1 to Range("CountryHeader").cells.count For j = 1 to Range("TitleHeader").cells.count CrosstabArray(i , j) = _ Worksheetfunction.sumproduct(Arg1, Arg2) next next I'm strugling with Arg1 & 2. If Arg1 were on the worksheet it would be: --(Title = $A3) where A3 is the intersection of the current row and the range "TitleHeader". Similarly, on the worksheet version, Arg2 would be: --(Country = B$2) For the VBA version i've tried for Arg1: (TitleArray = TitleHeaderArray(i)) and similar for Arg2: (CountryArray = CountryHeaderArray(j)) Am I completly off track? please help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with an array and SUMPRODUCT | Excel Worksheet Functions | |||
Sumproduct array | Excel Worksheet Functions | |||
Brush up Array Operation by example | Excel Discussion (Misc queries) | |||
Brush up Array Operation by example | Excel Discussion (Misc queries) | |||
Brush up Array Operation by example | Excel Discussion (Misc queries) |