Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Martin M
 
Posts: n/a
Default How can I add up how often certain text occurs?

Hi everyone.

My problem is to add up how often certain text occurs in a column. Doing
this when the cells I want to use are sequential eg B2 - B12, is easy. I use
=COUNTIF(B2:B12,"E").
What I can't do is add up when the cells aren't sequential eg B2 - B5, B7,
B10 - B12.
I try =COUNTIF(B2:B5,B7,B10:B12,"E"), but excel tells me I've entered too
many arguements. Using colons and commas in this way works when I add
numbers, but not when I add occurences of text, and I don't know why!

Any help would be gratefully recieved.

Many thanks, Martin
  #2   Report Post  
Ms. P.
 
Posts: n/a
Default

Is there a reason why you can use the cells sequentially? Unless the cells
you're omitting contain the result you're looking for, it shouldn't count
them right, or am I missing something?

"Martin M" wrote:

Hi everyone.

My problem is to add up how often certain text occurs in a column. Doing
this when the cells I want to use are sequential eg B2 - B12, is easy. I use
=COUNTIF(B2:B12,"E").
What I can't do is add up when the cells aren't sequential eg B2 - B5, B7,
B10 - B12.
I try =COUNTIF(B2:B5,B7,B10:B12,"E"), but excel tells me I've entered too
many arguements. Using colons and commas in this way works when I add
numbers, but not when I add occurences of text, and I don't know why!

Any help would be gratefully recieved.

Many thanks, Martin

  #3   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT(--(ISNUMBER(MATCH(ROW(B2:B12),{2,3,4,5,7,10,11,12},0 ))),--(B2
:B12="E"))

OR

=SUMPRODUCT(COUNTIF(INDIRECT({"B2:B5","B7","B10:B1 2"}),"E"))

Hope this helps!

In article ,
"Martin M" wrote:

Hi everyone.

My problem is to add up how often certain text occurs in a column. Doing
this when the cells I want to use are sequential eg B2 - B12, is easy. I use
=COUNTIF(B2:B12,"E").
What I can't do is add up when the cells aren't sequential eg B2 - B5, B7,
B10 - B12.
I try =COUNTIF(B2:B5,B7,B10:B12,"E"), but excel tells me I've entered too
many arguements. Using colons and commas in this way works when I add
numbers, but not when I add occurences of text, and I don't know why!

Any help would be gratefully recieved.

Many thanks, Martin

  #4   Report Post  
robmeister
 
Posts: n/a
Default


Hello Martin

You already have the answer using =COUNTIF(A1:A12,"E") will add only
E's even if you have other letters within the range.

Hope this helps


--
robmeister
------------------------------------------------------------------------
robmeister's Profile: http://www.excelforum.com/member.php...o&userid=24364
View this thread: http://www.excelforum.com/showthread...hreadid=380158

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
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM
Autofitting a row Josephine Excel Discussion (Misc queries) 2 March 3rd 05 03:37 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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