Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

Return count of values less than a value in another row

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
mcnuttlaw
Asked:
mcnuttlaw
2 Solutions
 
Saqib Husain, SyedEngineerCommented:
=SUMPRODUCT(--(A1:I1<A2:I2))

BTW the answer should be 4
A, D, H, I
0
 
byundtCommented:
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
 
mcnuttlawAuthor Commented:
Awesome, thanks.

And I stand corrected!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now