Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed urgently..:( harveen Excel Worksheet Functions 8 February 10th 09 09:19 PM
Urgently help needed - dropdown box does not show up bau Excel Discussion (Misc queries) 1 March 10th 08 06:45 PM
Command Button Error - Help Needed Urgently Please Salman Excel Worksheet Functions 2 March 7th 07 10:24 AM
help needed urgently wardah Excel Worksheet Functions 2 October 4th 06 12:02 PM
Help Needed Urgently John Excel Worksheet Functions 2 September 13th 05 02:58 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"