ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   help with the countif function!! (https://www.excelbanter.com/excel-worksheet-functions/34184-help-countif-function.html)

AtlantaMegan

help with the countif function!!
 
I'm trying to use the countif function - it is working with some of my
values, but not with others...
The data is all text (ie AS, BS, CS, SM, etc). It isn't working with only
some of the data, but I haven't changed anything. My formula is:
=countif(range,cell that contains value to be counted)
What am I doing wrong here?

I'm copying the data in from another spreadsheet. If I re-enter the data in
manually it counts it properly, but then my Vlookup for the same entered data
does not work.

ScottO

One possible cause ...

The data coming from the other spreadsheet may contain some "invisible"
characters (like spaces) - that would explain why it works when you manually
enter the data.
If you click on a cell containing some data that doesn't work, then click in
the formula bar, then use the arrow keys to move one character space at a
time through the data you may notice a space.
If you find there are spaces, then you'll need to strip them out, or change
your formula to handle them.

The Trim function is good for removing rogue spaces.

Rgds,
ScottO

"AtlantaMegan" wrote in message
...
| I'm trying to use the countif function - it is working with some of my
| values, but not with others...
| The data is all text (ie AS, BS, CS, SM, etc). It isn't working with only
| some of the data, but I haven't changed anything. My formula is:
| =countif(range,cell that contains value to be counted)
| What am I doing wrong here?
|
| I'm copying the data in from another spreadsheet. If I re-enter the data
in
| manually it counts it properly, but then my Vlookup for the same entered
data
| does not work.



CLR

It might be that some of your data has unseen leading spaces, and some does
not.......
Your formula syntax is fine.......

Could be your VLOKUP is set up to look for the leading spaces too which are
negated when you manually overtype........


Vaya con Dios,
Chuck, CABGx3


"AtlantaMegan" wrote in message
...
I'm trying to use the countif function - it is working with some of my
values, but not with others...
The data is all text (ie AS, BS, CS, SM, etc). It isn't working with only
some of the data, but I haven't changed anything. My formula is:
=countif(range,cell that contains value to be counted)
What am I doing wrong here?

I'm copying the data in from another spreadsheet. If I re-enter the data

in
manually it counts it properly, but then my Vlookup for the same entered

data
does not work.





All times are GMT +1. The time now is 01:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com