COUNTIF STOPS COUNTING

  • Thread starter Thread starter bashtherat
  • Start date Start date
B

bashtherat

I used the following formula to count the number of times "NPRP served"
appears in a worksheet column: =COUNTIF(H3:H38,"*NPRP served*"); but it stops
counting if there is too much text before the target text appears.

Why does this happen and how do I get round it?

Please help.
 
bashtherat said:
I used the following formula to count the number of times "NPRP served"
appears in a worksheet column: =COUNTIF(H3:H38,"*NPRP served*"); but it stops
counting if there is too much text before the target text appears.

Why does this happen and how do I get round it?

Please help.


Try this array formula (use CTRL+SHIFT+ENTER):

=COUNT(--(FIND("NPRP served",H3:H38)>0))
 
Glenn said:
Try this array formula (use CTRL+SHIFT+ENTER):

=COUNT(--(FIND("NPRP served",H3:H38)>0))

And without the ">0", the "--" also can be dropped, leaving you with this:

=COUNT(FIND("NPRP served",H3:H38))
 
I used the following formula to count the number of times "NPRP served"
appears in a worksheet column: =COUNTIF(H3:H38,"*NPRP served*"); but it stops
counting if there is too much text before the target text appears.

Why does this happen and how do I get round it?

Please help.


Shouldn't happen, unless you're running into a limit on the number of
characters in the cell, in which case the value wouldn't be there.

Please give example of an instance how this fails.
--ron
 
Ron said:
Shouldn't happen, unless you're running into a limit on the number of
characters in the cell, in which case the value wouldn't be there.

Please give example of an instance how this fails.
--ron


Anything over 255 characters is not found by COUNTIF.
 
Your solution did not work.

I am running windows xp with office 2003 and the text box contains more than
255 characters.
 
Your solution did not work.

I am running windows xp with office 2003 and the text box contains more than
255 characters.
 
Define "did not work". Did you remember to array-enter (CTRL+SHIFT+ENTER) the
formula? What results did you get and what were you expecting?

Paste your exact formula and the data from one of the target cells you believe
are not being counted properly.

My latest test worked for a cell with over 32,000 characters.
 
Apologies Glenn

I used (CTRL+SHIFT_ENTER) before typing in the formula.

Once I pressed it after typing it worked great.

I'm just a novice!

Thanks for all your help.

Bash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top