#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Thornton
 
Posts: n/a
Default Counting Data

I am trying to count the number of occurrences that data in two columns
match

A B C D E
1

2 Colin Yes SE

3 Sue Outside Mid

4 Mary Inside SE

5 Julie Yes SE

6 Mark Yes Mid

7 Fiona Outside SE

For example i want to count the number of times "Yes" appears along side
"SE"


Hope you can help.

Colin


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Counting Data


Do you expect a result of 2 from your example?

=SUMPRODUCT(--(B2:B7="Yes"),--(C2:C7="SE"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=516581

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Counting Data

Hi,

Although the sumproduct is a better formula to use, my array formula
(Ctrl+Shift+Enter) is an alternative. Assuming your data is laid out like
this:

Yes Smith
No Mark
Yes Smith

In cell C8, array enter (Ctrl+Shift+Enter) the following formula:

SUM(IF((B4:B6="Yes")*(C4:C6="Smith"),1,0))




"Colin Thornton" wrote:

I am trying to count the number of occurrences that data in two columns
match

A B C D E
1

2 Colin Yes SE

3 Sue Outside Mid

4 Mary Inside SE

5 Julie Yes SE

6 Mark Yes Mid

7 Fiona Outside SE

For example i want to count the number of times "Yes" appears along side
"SE"


Hope you can help.

Colin



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Counting Data


Hi Ashish, of course SUM with CTRL+SHIFT+ENTER is an alternative but you
don't really need the IF in this case

=SUM((B4:B6="Yes")*(C4:C6="Smith"))

would suffice


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=516581

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
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM


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

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

About Us

"It's about Microsoft Excel"