ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Query counting cells in a row that exactly match cells in another (https://www.excelbanter.com/excel-discussion-misc-queries/91735-query-counting-cells-row-exactly-match-cells-another.html)

Marlsnz

Query counting cells in a row that exactly match cells in another
 
Can I use a formula to count how many cells in a particular row is exactly
equal to the corresponding cell in another row?
In the example below, I want to compare Rows 3 & 4 against Row 1.
the answer for Row 3 would be 3 (the 1st, 3rd and 5th numbers) and the
answer for Row 4 would be 2 (the 2nd and 5th numbers)

eg
Row 1 = 3, 4, 5, 3 ,4, 3
Row 3 = 3, 5, 5, 4, 4, 6
Row 4 = 4, 4, 4, 5, 4, 5

If there is a formula, can it then be modified to show if the cell in Row 3
or 4 is greater (or less than) the corresponding cell in Row 1?

Hope this makes sense.

Cheers

Roger Govier

Query counting cells in a row that exactly match cells in another
 
Hi

Try
=SUMPRODUCT(--($A$1:$F$1=A2:F2))
and copy down

--
Regards

Roger Govier


"Marlsnz" wrote in message
...
Can I use a formula to count how many cells in a particular row is
exactly
equal to the corresponding cell in another row?
In the example below, I want to compare Rows 3 & 4 against Row 1.
the answer for Row 3 would be 3 (the 1st, 3rd and 5th numbers) and the
answer for Row 4 would be 2 (the 2nd and 5th numbers)

eg
Row 1 = 3, 4, 5, 3 ,4, 3
Row 3 = 3, 5, 5, 4, 4, 6
Row 4 = 4, 4, 4, 5, 4, 5

If there is a formula, can it then be modified to show if the cell in
Row 3
or 4 is greater (or less than) the corresponding cell in Row 1?

Hope this makes sense.

Cheers





All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com