Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 147
Default COUNTIF not counting properly

One of my users has a spreadsheet in which column A has a variety of string
entries. I am trying to count the number of times the string, WAGE, occurs.
I'm using the function: =COUNTIF(A115:A290,"WAGE") and it's returning only 21
occurences, when I know there's more than 50. I thought it had to do with
the cell format, because she had some of the strings formatted as numbers and
some as general, but when I changed all of the strings to general, it still
returns only 21 occurences. I've tried copying/pasting the function she used
for other strings that are calculating correctly, and I've tried entering the
function manually. Both to no avail. She is using Excel 2007 under Windows
XP SP3. I opened the spreadsheet on my Vista SP2 computer and get the same
results that she does. Any help would be greatly appreciated.
--
Christine
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default COUNTIF not counting properly

Hi,

The usual culprit is rogue spaces, try this

=SUMPRODUCT(--(TRIM(A115:A290)="wage"))

Mike

"Christine" wrote:

One of my users has a spreadsheet in which column A has a variety of string
entries. I am trying to count the number of times the string, WAGE, occurs.
I'm using the function: =COUNTIF(A115:A290,"WAGE") and it's returning only 21
occurences, when I know there's more than 50. I thought it had to do with
the cell format, because she had some of the strings formatted as numbers and
some as general, but when I changed all of the strings to general, it still
returns only 21 occurences. I've tried copying/pasting the function she used
for other strings that are calculating correctly, and I've tried entering the
function manually. Both to no avail. She is using Excel 2007 under Windows
XP SP3. I opened the spreadsheet on my Vista SP2 computer and get the same
results that she does. Any help would be greatly appreciated.
--
Christine

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default COUNTIF not counting properly

Hi

Change WAGE to *WAGE"
--
Thanks,
Shane Devenshire


"Christine" wrote:

One of my users has a spreadsheet in which column A has a variety of string
entries. I am trying to count the number of times the string, WAGE, occurs.
I'm using the function: =COUNTIF(A115:A290,"WAGE") and it's returning only 21
occurences, when I know there's more than 50. I thought it had to do with
the cell format, because she had some of the strings formatted as numbers and
some as general, but when I changed all of the strings to general, it still
returns only 21 occurences. I've tried copying/pasting the function she used
for other strings that are calculating correctly, and I've tried entering the
function manually. Both to no avail. She is using Excel 2007 under Windows
XP SP3. I opened the spreadsheet on my Vista SP2 computer and get the same
results that she does. Any help would be greatly appreciated.
--
Christine

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default COUNTIF not counting properly

or better still *wage*

"ShaneDevenshire" wrote:

Hi

Change WAGE to *WAGE"
--
Thanks,
Shane Devenshire


"Christine" wrote:

One of my users has a spreadsheet in which column A has a variety of string
entries. I am trying to count the number of times the string, WAGE, occurs.
I'm using the function: =COUNTIF(A115:A290,"WAGE") and it's returning only 21
occurences, when I know there's more than 50. I thought it had to do with
the cell format, because she had some of the strings formatted as numbers and
some as general, but when I changed all of the strings to general, it still
returns only 21 occurences. I've tried copying/pasting the function she used
for other strings that are calculating correctly, and I've tried entering the
function manually. Both to no avail. She is using Excel 2007 under Windows
XP SP3. I opened the spreadsheet on my Vista SP2 computer and get the same
results that she does. Any help would be greatly appreciated.
--
Christine

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default COUNTIF not counting properly


I tend to agree with the last post.
I would add that if the data is imported, it may have allsorts of code
attached form the source. Perhaps you should also use the CLEAN function.
Using boh the TRIM and CLEAN functions should ensure WYSIWYG.
"Christine" wrote:

One of my users has a spreadsheet in which column A has a variety of string
entries. I am trying to count the number of times the string, WAGE, occurs.
I'm using the function: =COUNTIF(A115:A290,"WAGE") and it's returning only 21
occurences, when I know there's more than 50. I thought it had to do with
the cell format, because she had some of the strings formatted as numbers and
some as general, but when I changed all of the strings to general, it still
returns only 21 occurences. I've tried copying/pasting the function she used
for other strings that are calculating correctly, and I've tried entering the
function manually. Both to no avail. She is using Excel 2007 under Windows
XP SP3. I opened the spreadsheet on my Vista SP2 computer and get the same
results that she does. Any help would be greatly appreciated.
--
Christine



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF counting incorrectly Dave Excel Worksheet Functions 9 May 6th 08 10:02 PM
COUNTIF not counting will b Excel Discussion (Misc queries) 3 September 14th 07 05:50 PM
COUNTIF not counting properly!! Character limit? kytihu Excel Worksheet Functions 2 January 30th 06 04:45 PM
Countif and Text - not counting karin Excel Discussion (Misc queries) 1 October 18th 05 07:43 PM
Using COUNTIF for Counting Words? Rich B Excel Worksheet Functions 2 September 26th 05 08:40 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"