Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Countif formula problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Smith - 31 May 2008 17:28 GMT
Hi folks,

Am doing a web query to pull down data. Worksheet can vary between 6 to 600 rows. Am trying to do a count of similar text names in column A. Text name to search is in cell J7. Download data will start on row 6.

I've tried =COUNTIF(A:A,J7) and get a result of zero. I've tried =COUNTIF(A$6:A$600,J7) and get a result of zero.

What am I doing wrong?

TIA,

Bob
T. Valko - 31 May 2008 18:03 GMT
>Am doing a web query

You might be pulling in unseen characters like char 160.

Tom might actually be _Tom_ where the underscores are the unseen characters.

There is a macro at this site that will clean these unseen characters:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

Signature

Biff
Microsoft Excel MVP

 Hi folks,

 Am doing a web query to pull down data. Worksheet can vary between 6 to 600 rows. Am trying to do a count of similar text names in column A. Text name to search is in cell J7. Download data will start on row 6.

 I've tried =COUNTIF(A:A,J7) and get a result of zero. I've tried =COUNTIF(A$6:A$600,J7) and get a result of zero.

 What am I doing wrong?

 TIA,

 Bob
Dave - 31 May 2008 18:04 GMT
Hi,
One reason, since you're pulling data from the web: it may contain spaces at
the beginning or end of the data, including Character 160.
The Trim function will get rid of most of these, but you'll need to address
the Character 160 issue separately.
Something like this in B6, copied down:
=TRIM(SUBSTITUTE(A6,CHAR(160)," "))
Then try COUNTIF on Column B
Regards - Dave.

> Hi folks,
>
[quoted text clipped - 7 lines]
>
> Bob
Robert Smith - 31 May 2008 19:46 GMT
Thanks for the replies Biff & Dave ... Both solutions work and Character 160
was included, but while reading other threads about Countif problems, I
found one solution about creating a pivot table, which seems to work quite
nicely as well.

Regards,

Bob

> Hi,
> One reason, since you're pulling data from the web: it may contain spaces
[quoted text clipped - 22 lines]
>>
>> Bob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.