ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   2 conditions (https://www.excelbanter.com/excel-discussion-misc-queries/247562-2-conditions.html)

an

2 conditions
 
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


Franz Verga

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




Jacob Skaria

2 conditions
 
Use SUMPRODUCT()
=SUMPRODUCT((A2:A6="m")*(B2:B610)*(B2:B6<=20))

If this post helps click Yes
---------------
Jacob Skaria


"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


an

2 conditions
 
Exactly, JS!

Thnaks
an

"Jacob Skaria" wrote:

Use SUMPRODUCT()
=SUMPRODUCT((A2:A6="m")*(B2:B610)*(B2:B6<=20))

If this post helps click Yes
---------------
Jacob Skaria


"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



All times are GMT +1. The time now is 03:10 PM.

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