Excel SUMIF COUNTIF

Microsoft Excel Spreadsheets

Microsoft Excel Tips

Excel
Spreadsheets Tips

Excel
VBA (macros) Tips

Excel
Tutorials

Consulting

 

All of Microsoft Excel Functions

Microsoft Excel Functions and Formulas

 

Summing with Excel SUMIF

Let's say that you have a set of data with columns for dates, products, cities, slaespersons, quantities and unit prices. With the SUMIF function, you can sum quantities based on a single criteria like date OR product OR salesperson... SUMPRODUCT is like Excel SUMIF on stero�ds, with SUMPRODUCT you can sum quantities based on date AND product AND salesperson AND any number of other criteria...

When you use SUMPRODUCT formulas in a report to look at a set of data, you can just change the data and the report is AUTOMATICALLY refreshed.

Counting with COUNTIF

Let's say that you have the same set of data as above. With the COUNTIF function, you can count the number of different products based on a single criteria like date OR city OR salesperson... SUMPRODUCT is like Excel COUNTIF on stero�ds, with SUMPRODUCT you can count the number of different products based on date AND city AND salesperson AND any number of other criteria...

When you use SUMPRODUCT formulas in a report to look at a set of data, you can just change the data and the report is AUTOMATICALLY refreshed.

  

The Excel SUMIF Formula

The general format for the SUMIF formula is as follow:
=SUMIF(range where condition,condition,sum what)
Applied to the following table, the result of the formula

=SUMIF(C2:C7,"=John",D2:D7)
the result shoud be "14":

 

A

B

C

D

1

Month

State

Name

Amount

2

Ma

MI

John

2

3

Ju

NY

Peter

6

4

Ma

PA

John

8

5

De

NH

Peter

3

6

No

RI

John

4

7

Oc

FL

Peter

6

The Excel SUMIF function is limited to one criteria (one column). If you want to sum the amounts based on month, State and name, discover the very simple SUMPRODUCT function with which you can use 2, 3 or more criteria with "or"  "and"...SUMPRODUCT is like SUMIF on stero�ds.

 

Microsoft Excel Spreadsheets

Data is to the enterprise what weaponry is for the army.
If you supply only the generals, you lose the war.

Free Excel Tips
Table of Contents

Free VBA (macros) Tips
Table of contents

Links to other
Excel-VBA Resources