Home Topics excel Excel function learning: Let's talk about the SUMPRODUCT function

Excel function learning: Let's talk about the SUMPRODUCT function

Apr 18, 2022 am 10:21 AM
excel sumproduct function

In the previous article "Practical Excel Tips Sharing: Two Ways to Quickly Delete Blank Rows in Batch", we learned the two fastest and fastest techniques for batch deleting blank rows in Excel. The following article will teach you how to use Excel functions and talk about the usage of SUMPRODUCT function. I hope it will be helpful to you!

Excel function learning: Let's talk about the SUMPRODUCT function

It is recommended that partners use English to understand the SUMPRODUCT function: sum is sum, product is product, and the combination is the sum of products.

The SUMPRODUCT function in Excel is an array type function.

In many cases, the SUMPRODUCT function can be used to replace the array formula of the SUM function, and there is no need to press the third key to end. Friends who left a message yesterday asking about the difference between the SUM function and the SUMPRODUT function can read this article carefully.

The usage of the SUMPRODUCT function is to multiply the corresponding elements between the arrays in the given sets of arrays and return the sum of the products.

First, get to know the SUMPRODUCT function

The syntax of the SUMPRODUCT function: SUMPRODUCT(array1,array2,array3, ... )

where Array1, array2, array3, ... are 2 to 30 arrays, and their corresponding elements need to be multiplied and summed.

Let’s first understand the SUMPRODUCT function through a simple case.

Excel function learning: Lets talk about the SUMPRODUCT function

Enter the formula: =SUMPRODUCT(A2:B4*C2:D4), which is to combine all the areas A2:B4 and C2:D4 The elements are multiplied correspondingly, and then the products are added, that is, 3*2 4*7 8*6 6*7 1*5 9*3, and the result is 156.

Enter the formula: =SUMPRODUCT(A2:B4), and the result is 31. According to the above points, if it is an array, then it is the sum of this array, so it is the sum of the {3,4;8,6;1,9} area.

Tip: The multiplication of two arrays is the multiplication of two corresponding numbers in the same row. Array data is enclosed in braces {}, and rows of data are separated by semicolons ";". If the data is in the same row, use commas ","separated.

There are three points to note when using the SUMPRODUCT function:

1. The array parameters must have the same dimensions, otherwise, the function SUMPRODUCT will return the error value #VALUE !.

2, function SUMPRODUCT treats non-numeric array elements as 0.

3, if it is an array, then it is the sum of this array.

Second, SUMPRODUCT function application: counting

The SUMPRODUCT function is used for multi-condition counting to calculate the number of data that meet 2 or more conditions. number. The formula is: SUMPRODUCT((Condition 1)*(Condition 2)*(Condition 3)*...)

Excel function learning: Lets talk about the SUMPRODUCT function

1, Statistics on how many copies of the book "Computer Basics and MS Office Applications" have been sold.

Excel function learning: Lets talk about the SUMPRODUCT function

#This question is about single condition summation. First of all, you need to know what the condition is. If the B2:B12=B2 area is equal to B2, this part is the condition.

If you directly enter =SUMPRODUCT(B2:B12=B2), the result will be 0. The first part of the usage introduction introduces: The function SUMPRODUCT treats non-numeric array elements as 0, B2:B12=B2, press the F9 key to get the execution result, which is a logical value in the form of true or false, so it is equal to 0.

Then how to convert logical values ​​into numerical values? You must let the logical values ​​participate in the operation. You can use --, *1, 0etc. For example, =TRUE*1, the result is 1. =FALSE*1, the result is 0. Therefore, just add *1 outside (B2:B12=B2).

The formula is: =SUMPRODUCT(1*(B2:B12=B2)), the result is 3 books.

2, count how many books "Computer Basics and MS Office Applications" Wang Yaodong has sold

Excel function learning: Lets talk about the SUMPRODUCT function

There are two conditions for this question : First, the statistical graphics and text are from the book "Computer Basics and MS Office Applications", represented by B2:B12=B2. Second, the salesperson is Wang Yaodong, represented by C2:C12="Wang Yaodong".

Excel function learning: Lets talk about the SUMPRODUCT function

Apply SUMPRODUCT((Condition 1)*(Condition 2)*(Condition 3)*...), and get the formula: =SUMPRODUCT((B2:B12=B2)*(C2:C12="Wang Yaodong")), the result is 2 books.

Third, SUMPRODUCT function application: summation

Use function SUMPRODUCT to sum. One of the parameters required by the function is the condition for judgment. The other is the data area used for summing.

SUMPRODUCT function summation application format: SUMPRODUCT((condition 1)*(condition 2)*(condition 3)*…*summation area)

1 , statistics on book sales of "Computer Basics and MS Office Applications".

Excel function learning: Lets talk about the SUMPRODUCT function

Apply the format and get the formula: =SUMPRODUCT((B2:B12=B2)*C2:C12)

2, count the book sales of Wang Yaodong's "Computer Basics and MS Office Applications"

Excel function learning: Lets talk about the SUMPRODUCT function

##Apply the format and get the formula:

=SUMPRODUCT( (B2:B12=B2)*(D2:D12=D2)*C2:C12)

Related learning recommendations:

excel tutorial

The above is the detailed content of Excel function learning: Let's talk about the SUMPRODUCT function. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1655
14
PHP Tutorial
1252
29
C# Tutorial
1225
24
Tips for dynamically creating new functions in golang functions Tips for dynamically creating new functions in golang functions Apr 25, 2024 pm 02:39 PM

Go language provides two dynamic function creation technologies: closure and reflection. closures allow access to variables within the closure scope, and reflection can create new functions using the FuncOf function. These technologies are useful in customizing HTTP routers, implementing highly customizable systems, and building pluggable components.

Considerations for parameter order in C++ function naming Considerations for parameter order in C++ function naming Apr 24, 2024 pm 04:21 PM

In C++ function naming, it is crucial to consider parameter order to improve readability, reduce errors, and facilitate refactoring. Common parameter order conventions include: action-object, object-action, semantic meaning, and standard library compliance. The optimal order depends on the purpose of the function, parameter types, potential confusion, and language conventions.

Complete collection of excel function formulas Complete collection of excel function formulas May 07, 2024 pm 12:04 PM

1. The SUM function is used to sum the numbers in a column or a group of cells, for example: =SUM(A1:J10). 2. The AVERAGE function is used to calculate the average of the numbers in a column or a group of cells, for example: =AVERAGE(A1:A10). 3. COUNT function, used to count the number of numbers or text in a column or a group of cells, for example: =COUNT(A1:A10) 4. IF function, used to make logical judgments based on specified conditions and return the corresponding result.

Comparison of the advantages and disadvantages of C++ function default parameters and variable parameters Comparison of the advantages and disadvantages of C++ function default parameters and variable parameters Apr 21, 2024 am 10:21 AM

The advantages of default parameters in C++ functions include simplifying calls, enhancing readability, and avoiding errors. The disadvantages are limited flexibility and naming restrictions. Advantages of variadic parameters include unlimited flexibility and dynamic binding. Disadvantages include greater complexity, implicit type conversions, and difficulty in debugging.

What are the benefits of C++ functions returning reference types? What are the benefits of C++ functions returning reference types? Apr 20, 2024 pm 09:12 PM

The benefits of functions returning reference types in C++ include: Performance improvements: Passing by reference avoids object copying, thus saving memory and time. Direct modification: The caller can directly modify the returned reference object without reassigning it. Code simplicity: Passing by reference simplifies the code and requires no additional assignment operations.

How to write efficient and maintainable functions in Java? How to write efficient and maintainable functions in Java? Apr 24, 2024 am 11:33 AM

The key to writing efficient and maintainable Java functions is: keep it simple. Use meaningful naming. Handle special situations. Use appropriate visibility.

What is the difference between custom PHP functions and predefined functions? What is the difference between custom PHP functions and predefined functions? Apr 22, 2024 pm 02:21 PM

The difference between custom PHP functions and predefined functions is: Scope: Custom functions are limited to the scope of their definition, while predefined functions are accessible throughout the script. How to define: Custom functions are defined using the function keyword, while predefined functions are defined by the PHP kernel. Parameter passing: Custom functions receive parameters, while predefined functions may not require parameters. Extensibility: Custom functions can be created as needed, while predefined functions are built-in and cannot be modified.

C++ Function Exception Advanced: Customized Error Handling C++ Function Exception Advanced: Customized Error Handling May 01, 2024 pm 06:39 PM

Exception handling in C++ can be enhanced through custom exception classes that provide specific error messages, contextual information, and perform custom actions based on the error type. Define an exception class inherited from std::exception to provide specific error information. Use the throw keyword to throw a custom exception. Use dynamic_cast in a try-catch block to convert the caught exception to a custom exception type. In the actual case, the open_file function throws a FileNotFoundException exception. Catching and handling the exception can provide a more specific error message.

See all articles