Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help with SUMPRODUCT

Posted on 2012-03-30
3
Medium Priority
?
257 Views
Last Modified: 2012-03-30
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
Comment
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
  • Learn & ask questions
3 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 2000 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

by:horalia
ID: 37788416
Gotta work more with arrays... Thanks!
0
 
LVL 50

Expert Comment

by:barry houdini
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question