count

P

puiuluipui

Hi, i need to count the number of cells in column "C", but without the cell
that contains (anul).
Ex:

C
John (ed)
John E
John (anul)
Mary M
Mary (anul)
Mary (em)

resut = 4
There are only two cells containing (anul), so the result must be 4. I need
the code in cell "F1".
Can this be done?
Thanks!
 
M

Mike H

Hi,

Try this array formula, see below on how to enter array formula. Change the
range to suit.

=COUNT(IF(ISERROR(SEARCH("anul",C1:C10)),IF(C1:C10<>"",1)))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike
 
R

RagDyeR

One way:

=COUNTIF(C1:C20,"*")-COUNTIF(C1:C20,"*anul*")
--

HTH,

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


Hi, i need to count the number of cells in column "C", but without the cell
that contains (anul).
Ex:

C
John (ed)
John E
John (anul)
Mary M
Mary (anul)
Mary (em)

resut = 4
There are only two cells containing (anul), so the result must be 4. I need
the code in cell "F1".
Can this be done?
Thanks!
 
P

puiuluipui

It's working!
Thanks allot!

"Mike H" a scris:
Hi,

Try this array formula, see below on how to enter array formula. Change the
range to suit.

=COUNT(IF(ISERROR(SEARCH("anul",C1:C10)),IF(C1:C10<>"",1)))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike
 

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

Similar Threads

macro-add text 8
Conditional formatting 7
How to count the number of text? 4
Conditional formatting 2
Macro help 4
Multiple criteria 4
Sum 7
Formula help 1

Top