ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compare one row to another and sum the result (https://www.excelbanter.com/excel-discussion-misc-queries/18356-compare-one-row-another-sum-result.html)

foxwave

compare one row to another and sum the result
 
I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell


Dave Peterson

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell


--

Dave Peterson

foxwave

Thanks Dave,
Very close but I don't understand (--( can you explain?
I get a result that is not correct

Russell


"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell


--

Dave Peterson


foxwave

this result does work, however it does not distingush between "win" & "loss"

"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell


--

Dave Peterson


Dave Peterson

=sumproduct() likes to work with numbers.

the -- converts true's and false's to 1's and 0's.

Are you trying to just count the number of wins?

If yes:
=countif(b3:g3,"win")

I'm not quite sure what you're looking for.



foxwave wrote:

this result does work, however it does not distingush between "win" & "loss"

"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell


--

Dave Peterson


--

Dave Peterson

foxwave

Thanks again Dave,

I'm trying to count the number of "wins" in B3:G3 that match A3:G3.
A3:G3 is the team result and C3:G3 is the picks made by peolpe.



"Dave Peterson" wrote:

=sumproduct() likes to work with numbers.

the -- converts true's and false's to 1's and 0's.

Are you trying to just count the number of wins?

If yes:
=countif(b3:g3,"win")

I'm not quite sure what you're looking for.



foxwave wrote:

this result does work, however it does not distingush between "win" & "loss"

"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell

--

Dave Peterson


--

Dave Peterson


Dave Peterson

How about:

=SUMPRODUCT(--($B$1:$G$1="win"),--(B3:G3="win"))



foxwave wrote:

Thanks again Dave,

I'm trying to count the number of "wins" in B3:G3 that match A3:G3.
A3:G3 is the team result and C3:G3 is the picks made by peolpe.

"Dave Peterson" wrote:

=sumproduct() likes to work with numbers.

the -- converts true's and false's to 1's and 0's.

Are you trying to just count the number of wins?

If yes:
=countif(b3:g3,"win")

I'm not quite sure what you're looking for.



foxwave wrote:

this result does work, however it does not distingush between "win" & "loss"

"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

foxwave

Simply fantastic, UR a life saver.

Russell


"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1="win"),--(B3:G3="win"))



foxwave wrote:

Thanks again Dave,

I'm trying to count the number of "wins" in B3:G3 that match A3:G3.
A3:G3 is the team result and C3:G3 is the picks made by peolpe.

"Dave Peterson" wrote:

=sumproduct() likes to work with numbers.

the -- converts true's and false's to 1's and 0's.

Are you trying to just count the number of wins?

If yes:
=countif(b3:g3,"win")

I'm not quite sure what you're looking for.



foxwave wrote:

this result does work, however it does not distingush between "win" & "loss"

"Dave Peterson" wrote:

How about:

=SUMPRODUCT(--($B$1:$G$1=B3:G3))
and copy down.

foxwave wrote:

I have text in row B1:G1, and similar text in rows B3:G10.
If results in A1:G1 equals data in A3:G10 i want to sum the result of
matches in each row in column H
RESULT win win loss loss win SCORE

paul loss win win win loss
kim loss loss win win win

Hoping someone can help
Russell

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



All times are GMT +1. The time now is 12:43 PM.

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