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

M

Myrna Larson

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.
 
R

Ragdyer

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)
 
Top