Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to use the Count Function in Excel, but it isn't working. I am counting only items formatted as numbers. But when I enter in =Count(A1:A6) it doesn't give me a number. The cell just has the formula.
Any suggestions?

Hi,
COUNT() counts numbers.
You say that the cells in the range contain items formatted as numbers.
If they are not stored as real numbers, but as text that looks like numbers, then you will not get a value.
What happens if you use COUNTA instead?
COUNTA counts non-blank cells.
Regards

How did you enter the formula into the cell?
Did you preceded the equal sign with a space character?
If so, then you will get just the formula entered as TEXT.The first character must be the equal sign if you want to enter a formula.

Instead of counting UserIDs, I counted Dates instead and the function worked. But if I wanted to repeat the action, I had to copy and paste the Count function from another cell and manipulate it manually to get a new value.
I entered it as so:
=COUNT(A1:A2).
It returns
=COUNT(A1:A2).
I think I'll just stick to copying and pasting the formula.

If the cell was previously formatted as Text, it will not let go of that format when you enter a formula.
Try selecting the cell and changing its format to General or Number.
Then click in the Formula bar and then out, or double click in the cell and then out. This should reset the format of the cell and the formula should return a value.

Hi,
You say: Instead of counting UserIDs, I counted Dates
and this worked.
COUNT will count cells with dates, but it won't count cells with text even if the text looks like numbers.What happens if you use COUNTA() instead.
As DerbyDad03 said: if the cell with a formula has been formatted as text you will just see the formula. His advice on changing the cell to show the result of the formula works.
You also said:
But if I wanted to repeat the action, I had to copy and paste the Count function from another cell and manipulate it manually to get a new value.What action were you trying to repeat?
I also was not sure what you did when you 'manipulated it manually'. Can you give more detail - what did you actually do.Regards

I needed to use the count function more than once. So I would cut and copy the count formula in one cell and place it in a destination cell.
Manipulate manually would mean if the formula was from Count(A1:A2), then if you cut and paste to another cell the function would return Count(A4:A5) for example. I would then, change the formula to read Count(A3:A5).
I tried COUNTA and the same thing happened - it returned
=COUNTA(A1:A2) in the cell and didn't count.

Hi,
In that case I have to agree with DerbyDad03, that you have cells formatted as text.
Follow his instructions to revert the cell back to normal formula operation.
Format the cell that contains your formula as Number - General
Then click inside the formula in the formula bar.
Finally click the check mark next to the formula bar.If you have a lot of cells formatted as text, it may be easier to start with a new workbook, but don't copy and paste the cells with the formulas as they will be copied as text, not as functioning formulas.
HTH
Regards

Thats where my problem was. I exported the data into excel and I think it was transferred as text. Well, the project is done, but in the future, I'll keep that in mind to format as numbers.

![]() |
Excel formula help ~ if a...
|
Run Excel Macro as Automa...
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |