Transforming Financial Decision-Making (Part 22)

Dr Lim Thou Tin
DataFrens.sg
Published in
4 min readJan 26, 2024
Photo by Md Mahdi on Unsplash

Optimizing Financial Models in Excel: A Comparative Analysis of SUMPRODUCT and CSE Formulas

Array formulas created with Control + Shift + Enter (CSE) allow you to perform multiple calculations on one or more items within an array. They can return either a single result or multiple results.

The SUMPRODUCT function can also be used to perform similar tasks, such as multiplying and then summing pairs of numbers. However, there are differences in how they are used and their capabilities.

Let’s consider a portfolio of stocks with different weights and calculate the overall return of the portfolio using a CSE array formula and SUMPRODUCT function.

Objective

Calculate the weighted average return of the portfolio for the period from Year 0 to Year 1.

Example Scenario: Calculating Weighted Average Return

Using CSE: {=SUM(B2:B6*C2:C6)} (After typing, press Control + Shift + Enter)

Using SUMPRODUCT: =SUMPRODUCT(B2:B6, C2:C6)

This is an example of a situation where a CSE array formula might be preferred over the SUMPRODUCT function or other approaches is when we need to perform operations that involve conditional calculations based on multiple criteria across different ranges or arrays. This is particularly true if we’re dealing with more complex logical tests or operations that SUMPRODUCT cannot handle directly.

Let’s consider a situation where we have sales data for different products over several months, and we want to calculate the total sales only for specific products in specific months, given certain conditions.

Objective

Calculate the total sales for ‘Product 1’ and ‘Product 3’ in ‘February’ and ‘March’ only if the sales were greater than $500 in those months.

Example Scenario: Calculating Total Sales

Using CSE:

=SUM((A2:A6=”Product 1")*(B1:F1=”February”)*(B2:F6>500)*B2:F6) + 
SUM((A2:A6=”Product 1")*(B1:F1=”March”)*(B2:F6>500)*B2:F6) +
SUM((A2:A6=”Product 3")*(B1:F1=”February”)*(B2:F6>500)*B2:F6) +
SUM((A2:A6=”Product 3")*(B1:F1=”March”)*(B2:F6>500)*B2:F6)

Using SUMPRODUCT:

=SUMPRODUCT((A2:A6=”Product 1")*(B1:F1=”February”)*(B2:F6>500), B2:F6) +
SUMPRODUCT((A2:A6=”Product 1")*(B1:F1=”March”)*(B2:F6>500), B2:F6) +
SUMPRODUCT((A2:A6=”Product 3")*(B1:F1=”February”)*(B2:F6>500), B2:F6) +
SUMPRODUCT((A2:A6=”Product 3")*(B1:F1=”March”)*(B2:F6>500), B2:F6)

Similarly, it can also be said of any other CSE mathematical, statistical, or financial functions like FREQUENCY are used for more complex, array-based calculations, whereas standard functions like SUMPRODUCT are used for straightforward, range-based calculations. CSE functions are more powerful but also more complex and resource-intensive, making them suitable for advanced financial analysis scenarios. In contrast, standard functions are easier to use and more efficient for common, everyday tasks.

A summarized comparison table showing CSE array formulas and the SUMPRODUCT function considerations when constructing financial modeling:

In conclusion, it can be said that CSE array formulas is preferred for complex, multi-criteria calculations where the conditions are nested or involve operations across different ranges. It’s more suitable for advanced users who are comfortable with complex Excel functionalities.

As for SUMPRODUCT function it is best for more straightforward scenarios where we need to multiply and then sum arrays, especially when dealing with large datasets. It’s user-friendly and more efficient performance-wise.

Programming languages like VBA or R could be preferred for highly complex tasks, automation, integration with external data sources, or when the model requires scalability and maintainability beyond what Excel formulas can offer. It has a steeper learning curve but provides maximum flexibility and power.

In financial modeling, the choice between the different approaches largely depends on the specific requirements of the task and the user’s familiarity with the specific programming language or Excel functions and formulas.

Reference:

Array Formulas in Excel

Excel for Accounting & Finance Professionals (Part 5) | by Dr Lim Thou Tin | Medium

--

--

Dr Lim Thou Tin
DataFrens.sg

An IT & business strategist with a doctorate in Knowledge Management & Intelligent Systems. Experienced in corporate IT & educator at global institutions.