I'm seeking some advice on how I can design my spreadsheet to be faster. I'm using a sumproduct formula similar to:
I am using the ISNUMBER(SEARCH) approach because my Criteria could have wildcards. Sometimes I need to sum based on ABCDE and sometimes just ABC**.
Making matters worse, my sum range must be dynamic in that some rows need to sum across 1-2 columns and others 5-6.
This is because my table is like this,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer+Product[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]ABCDE-1234[/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]ACD-2385[/TD]
[TD]60[/TD]
[TD]80[/TD]
[TD]90[/TD]
[TD]10[/TD]
[/TR]
</tbody>[/TABLE]
So each row using this sumproduct must sum up a different number of months. I.e. some lines I want Jan-Mar, others Feb-Apr, and so forth (and the calendar goes for the full year).
This is absolutely painstakingly slow - this sumproduct is used in about 500 rows and then there are 3 variations on it for each row (Volume, Revenue, Margin).
My source data, where it is looking up to, is up to 50,000 rows.
I have spent HOURS on this trying to think of some way to make it more efficient but I just can't given all of the variables.
Is this just a case of trying to use Excel for something it wasn't built to do or is there something I can do to make this faster?
Code:
=SUMPRODUCT((ISNUMBER(SEARCH(Criteria,CriteriaRange)) * (INDEX(SumRange,,X):INDEX(SumRange,,Y))
I am using the ISNUMBER(SEARCH) approach because my Criteria could have wildcards. Sometimes I need to sum based on ABCDE and sometimes just ABC**.
Making matters worse, my sum range must be dynamic in that some rows need to sum across 1-2 columns and others 5-6.
This is because my table is like this,
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Customer+Product[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]ABCDE-1234[/TD]
[TD]10[/TD]
[TD]20[/TD]
[TD]30[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]ACD-2385[/TD]
[TD]60[/TD]
[TD]80[/TD]
[TD]90[/TD]
[TD]10[/TD]
[/TR]
</tbody>[/TABLE]
So each row using this sumproduct must sum up a different number of months. I.e. some lines I want Jan-Mar, others Feb-Apr, and so forth (and the calendar goes for the full year).
This is absolutely painstakingly slow - this sumproduct is used in about 500 rows and then there are 3 variations on it for each row (Volume, Revenue, Margin).
My source data, where it is looking up to, is up to 50,000 rows.
I have spent HOURS on this trying to think of some way to make it more efficient but I just can't given all of the variables.
Is this just a case of trying to use Excel for something it wasn't built to do or is there something I can do to make this faster?