11 views

Uploaded by Thiyaga Rajan

excel formula description

- Bar Bending Schedule
- gantt-chart_L
- Microsoft Excel Lesson for Showcase
- Financial Modelling
- Refreshing PI Data in Excel.pdf
- 300 excel tips
- Excel Test
- Mail Merge Tutorial v2007
- Learn Excel in 1 Day: Definitive Guide to Learn Excel for Beginners-1
- Rectangular Tank Stiffener Calc
- Final Revision
- Welcome to ExcelSafe
- excel training manual 1
- Gantt-chart o365 L
- 8068dd01-Sap Cats Sample
- Data Services in Your Spreadsheet
- code.docx
- Using Spreadsheets for Steel Design
- 18850_EXCEL
- excela

You are on page 1of 7

1 of 7

Learn Microsoft Word

Learn Google Analytics

Contact Us

Home

the results using SUMPRODUCT

Microsoft Excel

215

12

googleplus

19

11

columns or rows of numbers together (e.g. Quantity Sold and

Price Per Unit) and add the results of each individual

calculation together. Without the SUMPRODUCT function,

you would have to to create a third column or row in which

you write a formula to multiply the Quantity by Price for each

entry in your data, and then write another formula to find the

sum of all of those numbers. You can also use

SUMPRODUCT with one or multiple criteria, whereby

SUMPRODUCT will only operate on rows that meet the

criteria you define.

This lesson shows you how to use SUMPRODUCT to do all this, with just one

formula.

Scenarios where SUMPRODUCT is useful include:

Finding the total sales for all products, where you have Quantity Sold in one

column and Price per Unit in another.

Finding the total sales

for all products, but

only include those

sales for a specific City

(i.e. specify criteria for

SUMPRODUCT)

Finding the total sales

for all products, but

only include those

sales for a specific City

and Day (i.e. specify

multiple criteria for

SUMPRODUCT)

We'll cover examples of all three scenarios in this lesson.

SUMPRODUCT Syntax

The syntax of the SUMPRODUCT function is as follows:

=SUMPRODUCT(array1, [array2], [array3],...)

where array1 is the data in the first column, array2 is the data in the second

column and so on.

23/10/2015 15:00

Multiply two columns and add up the results using SUMPRODUCT | Mu... http://fiveminutelessons.com/learn-microsoft-excel/multiply-two-column...

2 of 7

You only need array1 for the function to work BUT if you only have array1

then SUMPRODUCT works the same way as SUM

Array2 and Array3 are both optional. In fact, you can have 255 arrays in

one SUMPRODUCT formula

However many arrays

you have, they must all

be the same shape.

You can't have array1

containing 43 cells in a

column, and array2

having only 42 cells Excell will return a

#VALUE error.

If any cells have text in

them, the

SUMPRODUCT

functions treats them

as containing zeros.

As we will see later, you can incorporate a logical test into each array value

to emulate the way that SUMIF or SUMIFS works.

Let's look at how to use SUMPRODUCT in a simple example. This is how most

people use SUMPRODUCT.

In this example, we'll use the following example where we want to find the

total value of sales for Monday:

As you can see, we have a range of products on sale at different unit prices.

Without SUMPRODUCT, we would have to add a new column to find the

sales for each product, and then add up the results of that column to find

total sales.

In this case, we'll enter the SUMPRODUCT formula in a cell below the table:

can see, the formula includes two arrays:

An array (range of cells) that contains the quantity sold.

An array that contains the unit price

Our SUMPRODUCT formula works by multiplying the quantity by the unit

price for each row, and then returning the total for all rows in our array.

Bear in mind that this is a simple example that only uses two arrays - quantity

and price - to find the result we want. It's worth remembering at this point that

we can use more than two arrays if we wanted to.

23/10/2015 15:00

Multiply two columns and add up the results using SUMPRODUCT | Mu... http://fiveminutelessons.com/learn-microsoft-excel/multiply-two-column...

3 of 7

Let's now expand our simple example. Let's say we want to specify some

criteria for the SUMPRODUCT function so it only adds up the sum of some of

the rows. In other words, we'll use SUMPRODUCT to find a subtotal of our

data based on our criteria.

Let's say we have another sales report for Green Widgets which breaks

down our sales by city as well as by day, as shown here:

In other words, we want to use SUMPRODUCT to find the value of sales

of Green Widgets, with the additional criterion that we want to

include only those sales of Green Widgets made in St Louis.

We can expand the SUMPRODUCT function by changing one of the arrays

to include a test to see if the City is St Louis, as show here:

(B5:B14=D16)). As in the previous example, we have two arrays:

The first array, D5:D14, is the same, and contains the data for quantity

sold.

The second array, E5:E14, is different. It contains the unit price, but it then

multiplies the value in the Unit Price column by a logical formula,

B5:B15=D16.

This logical formula works by comparing the City value (column B) in each

row with the value in D16 (St Louis). If the value in the City colum is St

Louis, the logical formula returns 1, otherwise it returns 0.

Multiplying the price by the result of this logical formula by the

quantity sold for each row means that any row where the City is not St

Louis will have a value of zero when SUMPRODUCT adds up the

products of all the rows.

We have achieved our objective - we have used SUMPRODUCT with a

criteria of "City = St Louis". The result can be see in the field "Total Value

of Sales from St Louis.

You can download the spreadsheet we used for this example here.

You can read more about logical formulas in our lesson Using logical

operators and functions in Excel

It's important to note that it doesn't matter where in our formula we use the

logical formula to check if the City value is St Louis. We used Price, but

using Quantity would have yielded the same result. Here's what that formula

looks like::

=SUMPRODUCT(D5:D14*(B5:B14=D16),E5:E14)

Using SUMPRODUCT with criteria in this way allows us to find the answer we

want using a single formula. The alternative approach would be to add another

column in which we calculate the sales for each row by multiplying Quantity

Sold by Price. We could then use the SUMIF function to add up the numbers in

that column that match our criteria that the city must equal St Louis. As you

can imagine, this requires more work than using the SUMPRODUCT function

with a criterion as we have seen it here. You can learn more about SUMIF in

this lesson: Using SUMIF to add up cells in Excel that meet certain criteria

In our next example, we'll look at how we could use more than one criteria with

SUMPRODUCT.

For our next example, let's extend our example to have SUMPRODUCT

emulate the SUMIFS function. SUMIFS allows you to add up a row or column

of numbers, but only include those values where two or more criteria are

satisfied. You can read more about the SUMIFS function in this lesson: Use

SUMIFS to sum cells that match multiple criteria in Excel.

In this case, we would like to find the total value of sales for Green Widgets

sold in St Louis on Tuesday:

23/10/2015 15:00

Multiply two columns and add up the results using SUMPRODUCT | Mu... http://fiveminutelessons.com/learn-microsoft-excel/multiply-two-column...

4 of 7

(A5:A14=D17),E5:E14*(B5:B14=D16)) so that we are only :

The first array, D5:D14*(A5:A14=D17), will return the quantity sold if the

Day is Tuesday (i.e. the value in D17), or zero if the day is not Tuesday.

The second array, E5:E14*(B5:B14=D16), will return the unit price if the

City is St Louis (i.e. the value in D16), or zero if the city is not St Louis.

In other words, only rows that include Day = Tuesday AND City = St Louis

will be included in our total.

Finally, if you wanted to find the total value of sales for Green Widgets sold

in St Louis OR Chicago on any day, you could use this formula:

=SUMPRODUCT(--((B5:B14="Chicago")+(B5:B14="St

Louis")),D5:D14,E5:E14)

This formula checks to see if the City column contains Chicago or St Louis

and returns 1 if either are found, and 0 if neither are found. This result is

multiplied by the Quantity and Price columns to give the result.

In this lesson we looked at how SUMPRODUCT can save a lot of time when

trying to summarise data in a spreadsheet. Specifically, we were able to use it

to write one formulat that will find the total sales in a data table that includes

Quantity Sold and Unit Price, without having to create a new column to find

the total sales value for each row.

We also looked at how to use SUMPRODUCT with one or more criteria to

find the total sales in our example, but only for those rows that met the criteria

we specified. In our examples, we first found the total for all rows that matched

a certain City, and for those rows that matched a certain City AND Day. We

also considered the use of SUMIF as an alternative to using SUMPRODUCT,

and realised that it would involve writing multiple formulas to achieve the same

result.

other ways, or you have feedback on this lesson, feel free to

add a comment below.

Using SUMIF to add up cells in Excel that meet certain criteria

Use SUMIFS to sum cells that match multiple criteria in Excel

Calculate the sum of a column of numbers in Excel

Rounding numbers in Excel

215

12

googleplus

19

11

23/10/2015 15:00

5 of 7

We welcome your comments and questions about this lesson. We don't welcome spam. Our readers get a lot of value

out of the comments and answers on our lessons and spam hurts that experience. Our spam filter is pretty good at

stopping bots from posting spam, and our admins are quick to delete spam that does get through. We know that bots

don't read messages like this, but there are people out there who manually post spam. I repeat - we delete all spam,

and if we see repeated posts from a given IP address, we'll block the IP address. So don't waste your time, or ours.

Add a comment to this lesson

THIS POST REALLY HELPED ME!

Submitted by CANDIE on Tue, 04/14/2015 - 11:03

THIS POST REALLY HELPED ME! THANK YOU!

reply

Submitted by Sean on Wed, 05/20/2015 - 21:58

So basically I have made a spreadsheet comprising + and - figures. I have also added criteria's "W" and "L" that I

wish to make 2 separate conversions for EACH outcome.

For every "L" marked in column M, I want to subtract %5 from the number in column N of that same row to display in

column P. For every "W" marked in column M (i.e NOT satisfying the critera) I want the number to stay THE SAME as

N, but displayed in column P.

I have put together a formula I found in the comments under the SUMIF function, but have converted it to

SUMPRODUCT.

Here is the table example:

M--------------------N-----------------P

Win/Lose_____Total_____Commission

W___________9.80_____0.00 (needs to be 9.80(N2))

L____________14.32____13.60

L____________5.00_____4.75

W___________9.75_____0.00 (needs to be 9.75(N5))

This is how the formula currently stands:

{=SUMPRODUCT(--(LEFT(M2,1)="L"),N2*(1-5%))}

Now, my main problem here is that I already have a pre-filled spreadsheet with all the correct conversions, and I am

looking to continue without having to do it all manually. Currently with this formula, all cells in column P (marked with

"W" from column M) are being converted to 0, erasing the previous calculated result of another formula in column N.

How do I change the "0" outcomes to display the calculation from column N?

Also, I wish for the formula to continue indefinately. I've tried using M:M but it doesnt seem to work. I'm using AutoFill

for now, is there a better way of doing this?

Any help would be great!

Thanks

reply

23/10/2015 15:00

6 of 7

Submitted by Sean on Wed, 05/20/2015 - 22:09

So basically I have made a spreadsheet comprising + and - figures. I have also added criteria's "W" and "L" that I

wish to make 2 separate conversions for EACH outcome.

For every "L" marked in column M, I want to subtract %5 from the number in column N of that same row to display in

column P. For every "W" marked in column M (i.e NOT satisfying the critera) I want the number to stay THE SAME as

N, but displayed in column P.

I have put together a formula I found in the comments under the SUMIF function, but have converted it to

SUMPRODUCT.

Here is the table example:

M--------------------N-----------------P

Win/Lose_____Total_____Commission

W___________9.80_____0.00 (needs to be 9.80(N2))

L____________14.32____13.60

L____________5.00_____4.75

W___________9.75_____0.00 (needs to be 9.75(N5))

This is how the formula currently stands:

{=SUMPRODUCT(--(LEFT(M2,1)="L"),N2*(1-5%))}

Now, my main problem here is that I already have a pre-filled spreadsheet with all the correct conversions, and I am

looking to continue without having to do it all manually. Currently with this formula, all cells in column P (marked with

"W" from column M) are being converted to 0, erasing the previous calculated result of another formula in column N.

How do I change the "0" outcomes to display the calculation from column N?

Also, I wish for the formula to continue indefinately. I've tried using M:M but it doesnt seem to work. I'm using AutoFill

for now, is there a better way of doing this?

Any help would be great!

Thanks

reply

PT 05 M

Ar t icle

SHARE

Like Sign Up to see what your friends like.

Tweet

Additional Info

23/10/2015 15:00

7 of 7

Similar lessons

Using SUMIF to add up cells in Excel that meet

certain criteria

Use SUMIFS to sum cells that match multiple criteria

in Excel

Calculate the sum of a column of numbers in Excel

Rounding numbers in Excel

Get smarter in just five minutes! Join our mailing list (it's

free!) and get updates whenever new lessons are added!

Email Address *

First Name *

I want to learn more about:

Microsoft Excel

Microsoft Word

Google Analytics

Google Adwords

Facebook Marketing

Sign me up!

701 likes

August 13

We really like the new Office 2016 for Mac but ...

the Autoupdate feature has revealed a major flaw.

Check out the file sizes of the updates for these

Microsoft Office products. See how big the Office

2011 update is compared to each of the other

updates? There's something wrong here...

Ads by Google

Excel Formulas

Formula to Calculate

Microsoft Excel How To

Downloading

Downloads

privacy policy

23/10/2015 15:00

- Bar Bending ScheduleUploaded byGanesh Peketi
- gantt-chart_LUploaded bykashifmeo
- Microsoft Excel Lesson for ShowcaseUploaded bymit6pavel
- Financial ModellingUploaded byPRACHI DAS
- Refreshing PI Data in Excel.pdfUploaded byIñaki Eseberri
- 300 excel tipsUploaded byGlenn
- Excel TestUploaded bymuzrulz
- Mail Merge Tutorial v2007Uploaded bytravist6983
- Learn Excel in 1 Day: Definitive Guide to Learn Excel for Beginners-1Uploaded bySuad Šatara
- Rectangular Tank Stiffener CalcUploaded byadonara_je
- Final RevisionUploaded byMostafa Ahmed Abo El-ftouh
- Welcome to ExcelSafeUploaded bysheeron20
- excel training manual 1Uploaded byapi-250729471
- Gantt-chart o365 LUploaded byRegrine Lagarteja
- 8068dd01-Sap Cats SampleUploaded byWilly De Patra
- Data Services in Your SpreadsheetUploaded byvthung
- code.docxUploaded byEmil Abdo
- Using Spreadsheets for Steel DesignUploaded byAmro Ahmad Ali
- 18850_EXCELUploaded byZekria Noori Afghan
- excelaUploaded byHappyEva
- ms excalUploaded byAngela Brooks
- Introductory Financial ModelingUploaded byMM Fakhrul Islam
- Excel - IngilizceUploaded byHakan Keskin
- E15013Uploaded byKalepu Prasen
- Memo on Calculating Prejudgment Interest in ExcelUploaded bybrancron
- G 196 ContentUploaded byAbdul Raheem
- MS Excel foundationUploaded byEdgar Dauzon
- TheBasics.MSExcelUploaded bySachin Maskeen
- Excel Specifications and Limits - Excel - Office2007Uploaded bymohkrist
- Surfer GridsUploaded bysantho_joe

- Astral Upvc Sch40 Pipes and Fittings PricelistUploaded byThiyaga Rajan
- Astral Upvc Sch40 Pipes and Fittings PricelistUploaded byThiyaga Rajan
- NEFT Mandate Form for Your LIC Policies.pdfUploaded byThiyaga Rajan
- 1_pipe Schedule & Weight MeasurementUploaded bySutrisno Kls
- Final DSR2007Uploaded byThiyaga Rajan

- PPL-Unit_3Uploaded bypraveennallavelly
- 411PROFIBUSENGUploaded byRaja Shannmugam
- VBAcard2Uploaded byClaudio Rivera
- Just About ExcelUploaded byAtul Bhardwaj
- Advanced Bash Scripting GuideUploaded byDeomar Magana Gumaman
- extend-autocad-entity-data XDATA.pdfUploaded bymike00
- NET ChecklistUploaded byLlamasOS
- PIC24c65Uploaded byFerner Briceño
- Waveform GenUploaded byPolitik Itu Kejam
- PythiaUploaded bythothek
- DsaUploaded byrkumar8357
- TaintDroidUploaded byWesley Jin
- Array ListUploaded byJenny Muñequita
- 0470853204Uploaded byWil Wila
- important QuestionUploaded bySathish Kumar
- Introduction to C Programming LanguageUploaded byPushpinder Singh Khalsa
- xsgirl99 cmpsc-200-exam-iiUploaded byapi-296073547
- Traffic signal timing optimisation based on genetic algorithm approach, including drivers routingUploaded bycruxian
- MCA 105 Structured Programming in CUploaded bySayuj Sonu
- diagnostic manual.pdfUploaded bysanjeev_ramteke
- Fortran95 ManualUploaded bytpaiva
- Data Structures and Algorithms MCQ -2Uploaded byKuldeep Singh
- Highline Excel 2016 Class 10 Data ValidationUploaded byene
- LetUsC-YashwantKanetkarUploaded bySatyanag Venishetty
- AnsysUploaded byNikola Boskovic
- Sugandha Sharanya-data Structures and Algorithms_ Using c (2016)Uploaded byRahul Kumar
- LogUploaded byAlejandro Quiñones Caicedo
- Oracle vs. Google Opening Slides 1592541Uploaded bythomasiodine
- knapUploaded byFahad Ahmed
- xll6Uploaded byJose Sanchez