Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to get last row in numeric data in Excel
  • How to use Excel OFFSET function
  • How to get first column number in range in Excel
  • How to use Excel TRANSPOSE Function
  • Extract all partial matches in Excel

Data Analysis Examples

  • Working With Tables in Excel
  • Randomize/ Shuffle List in Excel
  • Subtotal function in Excel
  • How To Create Pareto Chart in Excel
  • Get column name from index in Excel Table

Data Validation Examples

  • Excel Data validation number multiple 100
  • Excel Data validation allow weekday only
  • Excel Data validation date in next 30 days
  • Excel Data validation date in specific year
  • Data validation must not exist in list

Sum formulas only in Excel

by

This tutorial shows how to Sum formulas only in Excel using the example below;

Formula

=SUMPRODUCT(range*ISFORMULA(range))

Explanation

To sum results from formulas only, you can use the SUMPRODUCT and ISFORMULA functions. In the example shown, the formula in F6 is:

=SUMPRODUCT(sales*ISFORMULA(sales))

where “sales” is the named range C5:C13, values in C5:C9 are hardcoded, and values in C10:C13 are generated with formulas.

Worked Example:   Cash denomination calculator in Excel

How this formula works

This formula uses boolean logic to “filter” the numbers in column C before summing with the SUMPRODUCT function. When the formula is evaluated, values in the named range “sales” are expanded into an array:

{925;1038;1105;1210;1250;1313;1379;1448;1520}

To filter out any values that aren’t created by a formula, the ISFORMULA function is to create an array of TRUE FALSE values like this:

=ISFORMULA(sales)
={FALSE;FALSE;FALSE;FALSE;FALSE;TRUE;TRUE;TRUE;TRUE}

When these two arrays are multiplied by each other, the math operation coerces the TRUE and FALSE values to 1’s and 0’s:

=SUMPRODUCT({925;1038;1105;1210;1250;1313;1379;1448;1520}*{0;0;0;0;0;1;1;1;1})
=SUMPRODUCT({0;0;0;0;0;1313;1379;1448;1520})

The zeros cancel out non-formula results, and SUMPRODUCT sums and returns a final result.

Worked Example:   Sum if equal to one of many things in Excel

Not formulas

To sum values not generated by a formula, you can add the NOT function like this:

=SUMPRODUCT(sales*NOT(ISFORMULA(sales)))

Here, the NOT function reverses the TRUE FALSE results returned by ISFORMULA function, which filters out any values generated with a formula.

Worked Example:   Count numbers that begin with in Excel

Post navigation

Previous Post:

Sum if cells contain either x or y in Excel

Next Post:

Sum every n rows in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Extract last name from full name — Manipulating NAMES in Excel
  • How to Capitalize first letter in a sentence in Excel
  • How to check if cell contains number in Excel
  • How to count total words in a range in Excel
  • How to get top level domain (TLD) in Excel
  • Get work hours between dates custom schedule in Excel
  • Display Date is workday in Excel
  • How to calculate next scheduled event in Excel
  • How to get year from date in Excel
  • Extract time from a date and time in Excel
  • How to Calculate Tax Rates in Excel
  • MDURATION function: Description, Usage, Syntax, Examples and Explanation
  • Calculate cumulative loan interest in Excel
  • ACCRINT function: Description, Usage, Syntax, Examples and Explanation
  • AMORLINC function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles