Sumproduct or better quicker formula

dariushou

Board Regular
Joined
Feb 17, 2008
Messages
126
Hello there,

I'm trying to figure out the best (the quickest for calculations) formula to use for my data set. My data is laid out in the following way:

I have about 30 sections in one worksheet. Each section has 6 scenarios. For example, the first section in the below example is "Average Balance Factor" and it has 6 scenarios accross columns B thru G. The data goes down about 600 rows--each row represents a month so "1" would equal month 1 and so on.

I have a model in another worksheet within the same workbook that looksup the relevant period and scenario that i'm using and uses that data in a calculation. I have a macro that goes through a loop of different loans and each loan could use a different scenario (depending on what scenario i've given to such loan).

I know that i can use the following two formulas (for the "Average Balance Factor as an example")

SUMPRODUCT((Data!$B$1:$G$1=Model!$B$13)*(Data!$A$6:$A$15=Model!$A26),Data!$B$6:$G$15)

With B13 being the scenario for that loan (B13 is populated by the macro)
A26 is just the current period

CSE formula array works as well
SUM(IF((Data!$B$1:$G$1=Model!$B$13)*(Data!$A$6:$A$15=Model!$A26),Data!$B$6:$G$15))

Because the data goes out 600 rows and is now over 180 columns (30 sections with 6 scenarios each) is there a better way than the sumproduct approach. I'm looking for speed here. Thanks,

For your help.

Excel Workbook
ABCDEFGHIJKLMNOPQRS
1Scenario123456123456123456
2
3
4PeriodAverage Balance FactorPenetration PercentagePremium
5
61100.00%100.00%100.00%100.00%100.00%100.00%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
7299.98%99.98%99.98%99.98%99.98%99.98%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
8399.60%99.60%99.60%99.60%99.60%99.60%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
9499.55%99.55%99.55%99.55%99.55%99.55%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
10599.35%99.35%99.35%99.35%99.35%99.35%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
11699.03%99.03%99.03%99.03%99.03%99.03%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
12798.83%98.83%98.83%98.83%98.83%98.83%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
13898.50%98.50%98.50%98.50%98.50%98.50%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
14997.89%97.89%97.89%97.89%97.89%97.89%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
151097.43%97.43%97.43%97.43%97.43%97.43%12.00%12.00%12.00%12.00%12.00%12.00%0.15%0.15%0.15%0.15%0.15%0.15%
Data
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,216,105
Messages
6,128,861
Members
449,472
Latest member
ebc9

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