ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help needed urgently (https://www.excelbanter.com/excel-worksheet-functions/264877-help-needed-urgently.html)

AndyW

Help needed urgently
 
Hi,

Im trying to check that one row of data satifies a criteria, then if it does
it counts an entry in another column adjescent to it.

Example: -

Column A - Column B
Blay - Y
Blay - N
Blay - Y
Chop - N
Chop - N
High - Y

What i would be asking (of a much bigger table) is If Column A = Blaydon and
then column B (same row) = Y, then count. In this example I would want 2
returned as the answer.
Is this possible?
Thanks
--
Andy

T. Valko

Help needed urgently
 
Try one of these...

Use cells to hold the criteria:

D2 = Blaydon
E2 = Y

If you're using Excel 2007 or later:

=COUNTIFS(A2:A7,D2,B2:B7,E2)

This will work in any (modern) version of Excel:

=SUMPRODUCT(--(A2:A7=D2),--(B2:B7=E2))

--
Biff
Microsoft Excel MVP


"AndyW" wrote in message
...
Hi,

Im trying to check that one row of data satifies a criteria, then if it
does
it counts an entry in another column adjescent to it.

Example: -

Column A - Column B
Blay - Y
Blay - N
Blay - Y
Chop - N
Chop - N
High - Y

What i would be asking (of a much bigger table) is If Column A = Blaydon
and
then column B (same row) = Y, then count. In this example I would want 2
returned as the answer.
Is this possible?
Thanks
--
Andy




Tom-S[_2_]

Help needed urgently
 
Try this (based on your example):

=SUMPRODUCT((A1:A6="Blay")*(B1:B6="Y"))

Regards,

Tom


"AndyW" wrote:

Hi,

Im trying to check that one row of data satifies a criteria, then if it does
it counts an entry in another column adjescent to it.

Example: -

Column A - Column B
Blay - Y
Blay - N
Blay - Y
Chop - N
Chop - N
High - Y

What i would be asking (of a much bigger table) is If Column A = Blaydon and
then column B (same row) = Y, then count. In this example I would want 2
returned as the answer.
Is this possible?
Thanks
--
Andy


AndyW

Help needed urgently
 
Thanks everyone this works great
--
Andy


"T. Valko" wrote:

Try one of these...

Use cells to hold the criteria:

D2 = Blaydon
E2 = Y

If you're using Excel 2007 or later:

=COUNTIFS(A2:A7,D2,B2:B7,E2)

This will work in any (modern) version of Excel:

=SUMPRODUCT(--(A2:A7=D2),--(B2:B7=E2))

--
Biff
Microsoft Excel MVP


"AndyW" wrote in message
...
Hi,

Im trying to check that one row of data satifies a criteria, then if it
does
it counts an entry in another column adjescent to it.

Example: -

Column A - Column B
Blay - Y
Blay - N
Blay - Y
Chop - N
Chop - N
High - Y

What i would be asking (of a much bigger table) is If Column A = Blaydon
and
then column B (same row) = Y, then count. In this example I would want 2
returned as the answer.
Is this possible?
Thanks
--
Andy



.


T. Valko

Help needed urgently
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"AndyW" wrote in message
...
Thanks everyone this works great
--
Andy


"T. Valko" wrote:

Try one of these...

Use cells to hold the criteria:

D2 = Blaydon
E2 = Y

If you're using Excel 2007 or later:

=COUNTIFS(A2:A7,D2,B2:B7,E2)

This will work in any (modern) version of Excel:

=SUMPRODUCT(--(A2:A7=D2),--(B2:B7=E2))

--
Biff
Microsoft Excel MVP


"AndyW" wrote in message
...
Hi,

Im trying to check that one row of data satifies a criteria, then if it
does
it counts an entry in another column adjescent to it.

Example: -

Column A - Column B
Blay - Y
Blay - N
Blay - Y
Chop - N
Chop - N
High - Y

What i would be asking (of a much bigger table) is If Column A =
Blaydon
and
then column B (same row) = Y, then count. In this example I would want
2
returned as the answer.
Is this possible?
Thanks
--
Andy



.





All times are GMT +1. The time now is 04:30 PM.

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