Solved

Return count of values less than a value in another row

Posted on 2013-11-23
4
339 Views
Last Modified: 2013-11-23
I have two rows:

Row 1: 5 4 3 4 3 4 4 5 4
Row 2: 4 5 5 3 4 4 4 4 3

I need to count the number of occurrences that a value in Row 2 is less than its corresponding column in Row 1.  

In other words, is Row 2/Column A less than Row 1/Column A and so on.

So in this example, the total count would be 3 (columns A, D, I).
0
Comment
Question by:mcnuttlaw
4 Comments
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 500 total points
ID: 39671578
=SUMPRODUCT(--(A1:I1<A2:I2))

BTW the answer should be 4
A, D, H, I
0
 
LVL 81

Accepted Solution

by:
byundt earned 0 total points
ID: 39671583
ssaqibh has the right approach, but inadvertently counted row 1 being less than row 2. He meant to say:
=SUMPRODUCT(--(A2:I2<A1:I1))
0
 
LVL 2

Author Comment

by:mcnuttlaw
ID: 39671589
Awesome, thanks.

And I stand corrected!
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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,…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

773 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