Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ryesworld
 
Posts: n/a
Default How do you count data that matches more than one condition?

Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".
  #2   Report Post  
Bob Umlas
 
Posts: n/a
Default How do you count data that matches more than one condition?

=SUMPRODUCT(--(Range={"text string A","text string B"}))
Bob Umlas
Excel MVP

"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".



  #3   Report Post  
Biff
 
Posts: n/a
Default How do you count data that matches more than one condition?

Hi!

Try one of these:

=COUNTIF(A1:A10,"textA")+COUNTIF(A1:A10,"textB")

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,{"textA","textB"},0))))

Biff

"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".



  #4   Report Post  
RagDyer
 
Posts: n/a
Default How do you count data that matches more than one condition?

Another way:

=SUM(COUNTIF(A:A,{"aa","bb"}))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".


  #5   Report Post  
ryesworld
 
Posts: n/a
Default How do you count data that matches more than one condition?

Hi RagDyer...

I'd like to use your formula, "=SUM(COUNTIF(Sheet1!E1:E20,{"aa","bb"}))",
with your other formula from my other posting,
"=SUMPRODUCT((Sheet1!A1:A20=C1)*(Sheet1!B1:B20=D1) )". In other words,
Sheet1!B1:B20=D1 or D2. (D1 is "aa" and D2 is "bb"). A number count should
only be retuned if all data ranges are true. (ie: if a zero was retuned from
either formula, zero will be the answer)

I hope that makes sense....

"RagDyer" wrote:

Another way:

=SUM(COUNTIF(A:A,{"aa","bb"}))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".





  #6   Report Post  
RagDyer
 
Posts: n/a
Default How do you count data that matches more than one condition?

Don't know if I quite follow you.

Is this what you're looking for:

=SUMPRODUCT((Sheet1!A1:A20=C1)*(Sheet1!B1:B20={"aa ","bb"}))

OR, do you want to reference particular cells, instead of hard coding the
actual text:

=SUMPRODUCT((Sheet1!A1:A20=C1)*((Sheet1!B1:B20=D1) +(Sheet1!B1:B20=D2)))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"ryesworld" wrote in message
...
Hi RagDyer...

I'd like to use your formula, "=SUM(COUNTIF(Sheet1!E1:E20,{"aa","bb"}))",
with your other formula from my other posting,
"=SUMPRODUCT((Sheet1!A1:A20=C1)*(Sheet1!B1:B20=D1) )". In other words,
Sheet1!B1:B20=D1 or D2. (D1 is "aa" and D2 is "bb"). A number count

should
only be retuned if all data ranges are true. (ie: if a zero was retuned

from
either formula, zero will be the answer)

I hope that makes sense....

"RagDyer" wrote:

Another way:

=SUM(COUNTIF(A:A,{"aa","bb"}))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a

column
contains either "text string A" or "text string B".




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default Pls. help

how do i count a value with less than 1 days in a different columns???


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Pls. help

=COUNTIF(your_range;"<"&1)


Użytkownik "Nicole" napisał w wiadomości
...
how do i count a value with less than 1 days in a different columns???




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Pls. help

another way:

=SUM(IF((NOT(ISBLANK(your_range)))*(your_range<1), 1,))

CTRL+SHIFT+ENTER this formula as it is an array-formula, after having done
it correctly the formula will show with curly brackets
{=SUM(IF((NOT(ISBLANK(your_range)))*(your_range<1) ,1,))}

also pls replace ";" with "," in my previous formula to look like this:

=COUNTIF(your_range,"<"&1)



Użytkownik "Nicole" napisał w wiadomości
...
how do i count a value with less than 1 days in a different columns???




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Pls. help

yet another way

=SUMPRODUCT(NOT(ISBLANK(your_range))*(your_range<1 ))




Użytkownik "Nicole" napisał w wiadomości
...
how do i count a value with less than 1 days in a different columns???




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
Pivot table Data always showing up as "Count" qwopzxnm Excel Discussion (Misc queries) 1 September 26th 05 06:27 PM
adjacent data count from a binary column mike Excel Worksheet Functions 1 July 15th 05 03:00 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
How do I count number of cels the matches 2 conditions ? Abra Excel Worksheet Functions 2 February 27th 05 08:56 PM
count data but avoid double entries Manos Excel Worksheet Functions 1 December 14th 04 07:00 AM


All times are GMT +1. The time now is 04:27 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"