A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help needed urgently



 
 
Thread Tools Display Modes
  #1  
Old May 29th, 2010, 03:01 PM posted to microsoft.public.excel.worksheet.functions
andyw
external usenet poster
 
Posts: 6
Default 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
Ads
  #2  
Old May 29th, 2010, 03:09 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default 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



  #3  
Old May 29th, 2010, 03:44 PM posted to microsoft.public.excel.worksheet.functions
Tom-S[_2_]
external usenet poster
 
Posts: 68
Default 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

  #4  
Old May 30th, 2010, 09:30 AM posted to microsoft.public.excel.worksheet.functions
andyw
external usenet poster
 
Posts: 6
Default 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



.

  #5  
Old May 30th, 2010, 05:07 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default 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



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 OfficeFrustration.
The comments are property of their posters.