Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KN KN is offline
external usenet poster
 
Posts: 1
Default Count Instances of value in two columns

Hi,

I am trying to count the occurrences of a word in two columns. For
example if column A has the value "YES" and column B also has the
value "YES" then I want to count that as one instance of meeting the
condition that both columns must be YES in order to count the instance
in a third column. So the value of column C would be "1".

I can easily do this for one column using the COUNTIF function as
follows:

=COUNTIF(App_Inventory!A1:A10, "YES")

Thanks
KN

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Count Instances of value in two columns

=SUMPRODUCT(--(A2:A100="Yes"),--(B2:B100="Yes"))


--


Regards,


Peo Sjoblom



"KN" wrote in message
oups.com...
Hi,

I am trying to count the occurrences of a word in two columns. For
example if column A has the value "YES" and column B also has the
value "YES" then I want to count that as one instance of meeting the
condition that both columns must be YES in order to count the instance
in a third column. So the value of column C would be "1".

I can easily do this for one column using the COUNTIF function as
follows:

=COUNTIF(App_Inventory!A1:A10, "YES")

Thanks
KN



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Count Instances of value in two columns

On Oct 23, 9:42 am, KN wrote:
Hi,

I am trying to count the occurrences of a word in two columns. For
example if column A has the value "YES" and column B also has the
value "YES" then I want to count that as one instance of meeting the
condition that both columns must be YES in order to count the instance
in a third column. So the value of column C would be "1".

I can easily do this for one column using the COUNTIF function as
follows:

=COUNTIF(App_Inventory!A1:A10, "YES")

Thanks
KN


TRY THIS IN COLUMN C
=IF(A4="yes",IF(B4="yes",1,0),0)


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
Count the number of Instances louiscourtney Excel Discussion (Misc queries) 4 July 12th 07 09:16 PM
In a set of dates, can you count the number of Jan '07 instances? Linda Woodfield Excel Worksheet Functions 4 June 22nd 07 07:07 PM
count unique instances based on two columns [email protected] Excel Worksheet Functions 9 May 27th 07 01:49 AM
Formula to use to count instances of in Excel Bill Excel Worksheet Functions 5 December 22nd 05 02:46 PM
Count Instances Ken Excel Discussion (Misc queries) 2 April 2nd 05 12:41 AM


All times are GMT +1. The time now is 01:08 PM.

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"