Is there such a formula?

  • Thread starter Thread starter Julie P.
  • Start date Start date
J

Julie P.

Hi, I use Excel 97. Is there a formula which will allow me to automatically
count the number of cells in a range that have content?

For example, take this screenshot:

http://mallology.lunarpages.com/excel.gif

If I wanted to take all the cells between Columns F inclusive and O
inclusive, but below Row 2, and find out the number which have an "X" or
whatever marked in them, what should I do?

Thanks!

Julie
 
JE McGimpsey said:
One way:

=COUNTIF(F2:O1000,"*x*")


Hi again! I guess you read all of the Excel newsgroups. :)

I tried it and it worked! The only problem though is sometimes I also use
"y" instead of "x". I suppose I could do two separate formulas though, one
for "x" and one for "y", and then just add the two.

J.
 
Hi Julie,
I tried it and it worked! The only problem though is sometimes I also use
"y" instead of "x". I suppose I could do two separate formulas though, one
for "x" and one for "y", and then just add the two.

Or put the x or y in a cell (say F2) and refer to it in the formula, as in :

=COUNTIF(F2:O1000,"*" & F2 & "x*")

Regards,

Daniel M.
 
Daniel.M said:
Hi Julie,


Or put the x or y in a cell (say F2) and refer to it in the formula, as in :

=COUNTIF(F2:O1000,"*" & F2 & "x*")

Hi Daniel, thank you. I am not sure though if I understand the details of
what you mean. I generally have "x"'s and "y"'s scattered throughout the
range, so how does the "F2" come into play here?
 
Julie,

If you want to count the number of cells in that range
that have *anything* in them:

=COUNTA(F2:O1000)

Biff
 
Biff said:
Julie,

If you want to count the number of cells in that range
that have *anything* in them:

=COUNTA(F2:O1000)


Biff, thanks so much. Yes, that formula worked perfectly!

Julie
 

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