# Comparing (2) Rows of Data

1. ## Comparing (2) Rows of Data

I have (2) rows of data, A1:X1 & A2:X2.

I want to compare A1 to A2, B1 to B2, and so on. Additionally, I want count the sum each time A1 = (A2 - 1).

I know I need to implement an array formula, but I cannot get anything to work. I'm hoping this can be done in one formula.

Any help is greatly appreciated.  Register To Reply

2. ## Re: Comparing (2) Rows of Data

Welcome to the forum. The words that bother me here are and so on - what exactly do you mean? How many rows of data? What do they look like? Whats the objective of the exercise?  Register To Reply

3. ## Re: Comparing (2) Rows of Data

Thanks!

Its just 2 rows of data.

Row 1 represents par on a golf scorecard, 18 holes.
Row 2 represents my score on each of the 18 holes.

I need to count each time my score is 1 less than par

Example:
For the first 9 holes par is as follows:
(4,5,4,4,3,5,3,4,4)
My scores for the first 9 holes:
(4,4,4,4,3,4,3,4,3)  Register To Reply

4. ## Re: Comparing (2) Rows of Data

Formula:  `=IF(A1>A2,A1-A2,0)`

This formula will Deduct the par with your score when par score is greater than your score. Else it will become 0.  Register To Reply

5. ## Re: Comparing (2) Rows of Data

Im trying to get only one cell to count all the times I beat par.

So if I birdied 18 holes, the cells output would be 18.  Register To Reply

6. ## Re: Comparing (2) Rows of Data

With data as in post #3 try this
Formula:  `=SUMPRODUCT(--((A1:I1-A2:I2)=1))`
It returns 3.  Register To Reply

7. ## Re: Comparing (2) Rows of Data

That works!! Thank you!  Register To Reply

8. ## Re: Comparing (2) Rows of Data  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 