How can I count the number of cells in a range, having a constant.

  • Thread starter Thread starter Guest
  • Start date Start date
COUNTIF looks only at the values in the cells; the format is not relevant. If
you are counting the occurrences of the number 65, for example, it doesn't
matter what the font is, or whether it's bold or italic, or what the color of
the font or cell is.
 
You'll need a helper column to "break-out" the return of the CELL()
function.
Then count whatever particular format "label" you're interested in.

With ColumnA the column of interest, you could, for example, enter this in
B1:
=CELL("format",A1)
And drag down to copy as needed.

Then use this for example:
=COUNTIF(B1:B100,"P0")

You could also use a particular cell in ColumnB that matches the format
you're interested in:

=COUNTIF(B1:B100,B7)
 

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