how to count two different values from sheet

April 1, 2011 at 07:28:00
Specs: Windows XP
In my excel sheet i have two columns. One coulumn has different names for example A, B, C. In another coulmn contains different states e.g., S1, S2, S3 etc. Example of data:
A S2
A S1
B S3
A S1

Now i want to get how many S1 is associated to A. How can i will acomplish this?


See More: how to count two different values from sheet

Report •


#1
April 1, 2011 at 07:56:48
If your using 2007 then there is the =COUNTIFS() function (note the S at the end)

=COUNTIFS(A1:A4,"A",B1:B4,"s1")

MIKE

http://www.skeptic.com/


Report •

#2
April 1, 2011 at 08:00:00
Thanks for your quick reply. i am using 2003 only.

Report •

#3
April 1, 2011 at 08:57:07
=SUMPRODUCT(($A1:$A4="A")*($B1:$B4="S1"))

This works for me in 2003.

however i dont know how? Can some one explain me the use of $ and * here in this statement? Sorry for asking the basic question...


Report •

Related Solutions


Ask Question