Thread: 2 conditions
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Franz Verga Franz Verga is offline
external usenet poster
 
Posts: 459
Default 2 conditions

Hi an,

if your data are for example in the range A1:B20, the following formula will
count all the m in column A with values 10 and <=20 in colum B:

=SUMPRODUCT(($A$1:$A$20="m")*($B$1:$B$2010)*(B1:B 20<=20))

you can easily adapt the formula for your other conditions.

--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.


Thanks in advance for your feedback.


Ciao


Franz Verga from Italy (now in Berlin)

an wrote:
Hi!

I have next:

Col A Col B

m 10
f 23
f 54
m 20

I would like to Count:

m 10 to <=20
m 20 to <=30
m 30 to <=40
...
f 10 to =20
f 20 to =30
f 30 to =40
...

Thanks in advance
an