Discussion Locked

excel formula

0 helpful
15 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
need to know how to create a function that counts the number of celss in a columm

15 replies

by jgeist

Are they blank or do they contain numbers or formulas? If they're blank, use COUNTBLANK. There's also COUNT and COUNTA which can be found in the Function Wizard.

by kracquet7

If all the cells you want to count have some type of data, the formula should be =COUNTA(range)

However, if you want to count blanks, the formula would be =countblank(range)

If this doesn't work, please let us know what is in the cells (numeric data, alpha data, blanks, or formulas).

by instructor

The "count" command should work depending if you are counting cells with data or if they are empty. There is also a shortcut you can use on the fly, just highlight the cells you want to count, then on the right side of the status bar there is an "autocalculate" box. Right click on the box and select "count". That box will then give you a total of the number of cells selected. However, this total will not be inserted in your spreadsheet.

by kevin holden

Hello,
All of the answers are good, but we all have the same problem of the fact that we do not have all the specific details that we need. If need a count of the cells no matter what they contain (numbers, text, formulas, or are blank). You can use this formula, It will basically just count the number of cells and adjust itself automatically when rows are added or deleted.

=(COUNTA(C4:C23))+(COUNTBLANK(C4:C23))
Of course you must change the range references to meet you desired column.

by khinton

try this:
=COUNTA(D4:D9)+COUNTBLANK(D4:D9)
where d4:d9 is enter your own range
this will count all regardles of contents
if you want to see cells with entries use =counta(range) or =countblank(range)to count blank cells.
kevin

by pdsmith

If you are looking for a count of cells on a conditional basis, for example if you want to count cells that only have a YES or a 1 in them. You can use a COUNTIF formula.

=COUNTIF(A1:A10, "YES")or
=COUNTIF(A1:A10, 1)

This will give you the count of the cells A1 through A10 that are equal to "YES" or 1.

This discussion is closed to new replies.