Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default countif-multiple conditions

Is there a way to count the number of something if the condition that you're
counting is more than one string of values?

ie. I want to count the number of times "Data" or "Function" occurs in a
given cell

I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif-multiple conditions

Try one of these:

=COUNTIF(B2:B200,"Data")+COUNTIF(B2:B200,"Function ")

=SUM(COUNTIF(B2:B200,{"Data","Function"}))

Biff

"miteeka" wrote in message
...
Is there a way to count the number of something if the condition that
you're
counting is more than one string of values?

ie. I want to count the number of times "Data" or "Function" occurs in a
given cell

I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default countif-multiple conditions

maybe someone will have a better or shorter answer, but I found this works

=SUMPRODUCT(ISNUMBER(FIND("Data", B2:B200))*ISNUMBER(FIND("Function",
B2:B200))*1)


"miteeka" wrote:

Is there a way to count the number of something if the condition that you're
counting is more than one string of values?

ie. I want to count the number of times "Data" or "Function" occurs in a
given cell

I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default countif-multiple conditions

I think I might have misunderstood the question. The formula I gave will give
the count of cells that has both "Data" and "Function". This one will give
the count of cells that has "Data" or "Function". It's an array formula, so
enter by pressing CTRL+SHIFT+ENTER

=SUMPRODUCT(IF(ISNUMBER(FIND("Data", B2:B200)), TRUE,
IF(ISNUMBER(FIND("Function", B2:B200)), TRUE, FALSE))*1)



"Vergel Adriano" wrote:

maybe someone will have a better or shorter answer, but I found this works

=SUMPRODUCT(ISNUMBER(FIND("Data", B2:B200))*ISNUMBER(FIND("Function",
B2:B200))*1)


"miteeka" wrote:

Is there a way to count the number of something if the condition that you're
counting is more than one string of values?

ie. I want to count the number of times "Data" or "Function" occurs in a
given cell

I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default countif-multiple conditions

How about:

=SUMPRODUCT((B2:B200="Data")+(B2:B200="Function"))

Hope this helps.

Pete

On Mar 9, 7:02 pm, Vergel Adriano
wrote:
maybe someone will have a better or shorter answer, but I found this works

=SUMPRODUCT(ISNUMBER(FIND("Data", B2:B200))*ISNUMBER(FIND("Function",
B2:B200))*1)



"miteeka" wrote:
Is there a way to count the number of something if the condition that you're
counting is more than one string of values?


ie. I want to count the number of times "Data" or "Function" occurs in a
given cell


I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default countif-multiple conditions

=COUNTIF(B2:B200,"Data")+COUNTIF(B2:B200,"Function ")

--
Gary''s Student
gsnu200709


"miteeka" wrote:

Is there a way to count the number of something if the condition that you're
counting is more than one string of values?

ie. I want to count the number of times "Data" or "Function" occurs in a
given cell

I've tried =countif(B2:B200,"Data","Function") but it doesn't work. Any
suggestions? thanks
--
miteeka

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
Countif with Multiple Not Conditions Chart_Maker_Wonderer Excel Discussion (Misc queries) 12 March 8th 07 06:55 AM
COUNTIF with multiple conditions Eric Excel Discussion (Misc queries) 3 October 16th 06 06:29 PM
Multiple conditions on a countif Mr Mike Excel Worksheet Functions 5 January 24th 06 01:52 PM
COUNTIF Multiple Conditions Paul Sheppard Excel Discussion (Misc queries) 5 December 28th 05 07:03 PM
COUNTIF - multiple conditions allphin Excel Worksheet Functions 4 September 18th 05 04:05 PM


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