H
Hari
Hi ,
In cell B5 of sheet2 I have the following formula
SUMPRODUCT(('sheet1'!$B$2:$B$7000=$A5)*('sheet1'!$G$2:$G$7000=$B$3)*('sheet1
'!$H$2:$H$7000=$B$2)*('sheet1'!$I$2:$I$7000=$B$1)*('sheet1'!$C$2:$C$7000=C$4
))
This formula I am presently having in cell C5 or worksheet "sheet2". The
same formula is copied in cells C5:U500, AC5:AU500, BC5:BU500, CC5:CU500,
DC5U500, EC5:EU500 and FC5:FU500 of sheet2 with only one difference. That
is the second criteria $B$3 above is changed to $AB$3 for columns AC5:AU500,
changed to $BB$3 for BC5:BU500 , changed to $CB$3 for CC5:CU500, changed to
$DB$3 for DC5U500, changed to $EB$3 for EC5:EU500 and changed to $FB$3 for
FC5:FU500.
Just to explain the formula ranges in complete :-
Here, in the Sumproduct formula the first criteria checked for $A5 is for
the cells which has formulas in the row 5. Row 6 will have criteria as $A6
and so on.
Second criteria $B$3 is constant for columns from C to U only. For Columns
AC to AU the second criteria will be $AB$3 and for Columns BC to BU the
second criteria will be $BB$3 and so on for columns CC5:CU500, DC5U500,
EC5:EU500 and FC5:FU500.
Third criteria $B$2 is common for whole of sheet2
Fourth criteria $B$1 is common for whole of sheet2.
Fifth criteria C$4 is for cells in the column C. Column D cells will have
criteria as D$4 and so on.
Now I will be having atleast 30 more worksheets "sheet3" to "sheet 31" which
will be of the same format/layout as sheet2 and will be having the same
formulas in the cells C5:U500 , AC5:AU500, BC5:BU500, CC5:CU500, DC5U500,
EC5:EU500 and FC5:FU500 of respective sheets.
Only difference among sheets is that the value of $B$2 and $B$1 will change
depending on the sheet.Also the values in $B$3, $AB$3, $BB$3, $CB$3, $DB$3,
$EB$3 and $FB$3 will change depending on the sheet
The problem as stated in the subject and above is that I will be having
around 66500 cells having this sumproduct formula in one worksheet and I
will be having this same formula/format in 30 other sheets.
So that makes 66500*30 cells having huge sumproduct formulas in each one of
them.
Presently with just sheet1 ( which has all the raw data) and sheet 2 it
takes atleast 10 minutes for the calculations on a P3 and the size of the
workbook is around 2.7 MB
Once I add the rest 29 worksheets or so I expect my workbook to boot to ....
size and it will take Eons for calculation ( presently I have set to manual
so that it doesnt cripple me with "Recalculating..." for every minor change
in data).
My question is can a better formula be put to reduce the size of the
workbook or calculation time.
I have come across ARRAY formulas and read in some post that they are more
efficient but I dont know how to work with them. Please guide me if possible
for the present situation.
Regards,
Hari
India
In cell B5 of sheet2 I have the following formula
SUMPRODUCT(('sheet1'!$B$2:$B$7000=$A5)*('sheet1'!$G$2:$G$7000=$B$3)*('sheet1
'!$H$2:$H$7000=$B$2)*('sheet1'!$I$2:$I$7000=$B$1)*('sheet1'!$C$2:$C$7000=C$4
))
This formula I am presently having in cell C5 or worksheet "sheet2". The
same formula is copied in cells C5:U500, AC5:AU500, BC5:BU500, CC5:CU500,
DC5U500, EC5:EU500 and FC5:FU500 of sheet2 with only one difference. That
is the second criteria $B$3 above is changed to $AB$3 for columns AC5:AU500,
changed to $BB$3 for BC5:BU500 , changed to $CB$3 for CC5:CU500, changed to
$DB$3 for DC5U500, changed to $EB$3 for EC5:EU500 and changed to $FB$3 for
FC5:FU500.
Just to explain the formula ranges in complete :-
Here, in the Sumproduct formula the first criteria checked for $A5 is for
the cells which has formulas in the row 5. Row 6 will have criteria as $A6
and so on.
Second criteria $B$3 is constant for columns from C to U only. For Columns
AC to AU the second criteria will be $AB$3 and for Columns BC to BU the
second criteria will be $BB$3 and so on for columns CC5:CU500, DC5U500,
EC5:EU500 and FC5:FU500.
Third criteria $B$2 is common for whole of sheet2
Fourth criteria $B$1 is common for whole of sheet2.
Fifth criteria C$4 is for cells in the column C. Column D cells will have
criteria as D$4 and so on.
Now I will be having atleast 30 more worksheets "sheet3" to "sheet 31" which
will be of the same format/layout as sheet2 and will be having the same
formulas in the cells C5:U500 , AC5:AU500, BC5:BU500, CC5:CU500, DC5U500,
EC5:EU500 and FC5:FU500 of respective sheets.
Only difference among sheets is that the value of $B$2 and $B$1 will change
depending on the sheet.Also the values in $B$3, $AB$3, $BB$3, $CB$3, $DB$3,
$EB$3 and $FB$3 will change depending on the sheet
The problem as stated in the subject and above is that I will be having
around 66500 cells having this sumproduct formula in one worksheet and I
will be having this same formula/format in 30 other sheets.
So that makes 66500*30 cells having huge sumproduct formulas in each one of
them.
Presently with just sheet1 ( which has all the raw data) and sheet 2 it
takes atleast 10 minutes for the calculations on a P3 and the size of the
workbook is around 2.7 MB
Once I add the rest 29 worksheets or so I expect my workbook to boot to ....
size and it will take Eons for calculation ( presently I have set to manual
so that it doesnt cripple me with "Recalculating..." for every minor change
in data).
My question is can a better formula be put to reduce the size of the
workbook or calculation time.
I have come across ARRAY formulas and read in some post that they are more
efficient but I dont know how to work with them. Please guide me if possible
for the present situation.
Regards,
Hari
India