Solved

Help with SUMPRODUCT

Posted on 2012-03-30
253 Views
I need help creating a formula to count values in a table. This is what I have:

Pages   Pages Sent
3          3
4          10
5           5
2           12
6            6

I need to count the rows that have the same value in both columns and another count where the second value is bigger than the first one:
Same Amount of Pages: 3
Sent Duplicate Pages: 2

Thanks....
0
Question by:horalia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 27

Accepted Solution

Glenn Ray earned 500 total points
ID: 37788381
You can use array functions to calculate these values.  Press [Ctrl]+[Shift]+[Enter] to complete the entry.

Assuming your example values are in columns A & B, then

For Same Amount:
{=SUM(IF((A2:A6)=(B2:B6),1,0))}

For Duplicate Pages:
{=SUM(IF((A2:A6)<(B2:B6),1,0))}

-Glenn
0

Author Closing Comment

ID: 37788416
Gotta work more with arrays... Thanks!
0

LVL 50

Expert Comment

ID: 37788439
You could also do both with a non-array SUMPRODUCT as you suggest, e.g. for the first

=SUMPRODUCT((A2:A6=B2:B6)+0)

regards, barry
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

find and replace in column A across 75 csv books 8 31
Copy one row (from Word) into one cell 14 49
LOOK FOR 22 33
Resolving #VALUE error in spreadsheet 2 23
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses
Course of the Month3 days, 15 hours left to enroll