Summing 2 columns

T

TBoe

I can't seem to figure this out...here's an example spreadsheet.

1 blue red
2 red red
3 blue blue
4 red red
5 red blue

I trying to get the sum of red only when red is equal in both columns.
In this case the the total would be 2. I tried count and sum if but I think
my syntax is all wrong. Thanks so much..............

Terry
 
B

Bob Phillips

=SUMPRODUCT(--(A1:A100="red"),--(A1:A100=B1:B100))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

TBoe

YOU! YOU! Your good! You my man are a genius. Many, many thanks.
Now! Can you point me to a good website so I can understand that formula?

Thanks again
Terry
 
Top