![]() |
How do I compute a sum based on two columns
I want to compute a sum based on whether or not two columns contain certain
values. In otherwords, count the number of rows with colA = "X" and colB = "Y". |
How do I compute a sum based on two columns
One way:
=SUMPRODUCT(--(A1:A1000="X"),--(B1:B1000="Y")) will count. If you want to sum a third column: =SUMPRODUCT(--(A1:A1000="X"),--(B1:B1000="Y"),C1:C1000) For an explanation of "--" see http://www.mcgimpsey.com/excel/doubleneg.htm In article , "FISHbGood2" wrote: I want to compute a sum based on whether or not two columns contain certain values. In otherwords, count the number of rows with colA = "X" and colB = "Y". |
How do I compute a sum based on two columns
please be more explicit
"FISHbGood2" wrote: I want to compute a sum based on whether or not two columns contain certain values. In otherwords, count the number of rows with colA = "X" and colB = "Y". |
All times are GMT +1. The time now is 02:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com