Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Countif not working

Excel 2003

I'm trying to do a simple countif. In column A, I have...

A
010020
010020
010020
010020
10020
10020

In another cell, I have =COUNTIF(A:A,"010020"), which results in 6,
when I expect 4. It's counting the 10020 entries as well. I want an
exact match to the literal criteria I enter.

How do I do that?

Thanks,
Chuck

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Countif not working

Just use a wildcard to make Excel treat the criteria as text...

Try this
=COUNTIF(A1:A10,"010020*")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)




"c mateland" wrote in message
oups.com...
Excel 2003

I'm trying to do a simple countif. In column A, I have...

A
010020
010020
010020
010020
10020
10020

In another cell, I have =COUNTIF(A:A,"010020"), which results in 6,
when I expect 4. It's counting the 10020 entries as well. I want an
exact match to the literal criteria I enter.

How do I do that?

Thanks,
Chuck



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Countif not working

My previously posted formula would count 010020a as a matched item.

A less risky alternative:
=SUMPRODUCT(--(A1:A10="010020"))

Note: =SUMPRODUCT(--(A:A="010020")) won't work.
You need to use a range that doesn't resolve to an entire column.

Regards,

Ron
Microsoft MVP (Excel)


"Ron Coderre" wrote in message
...
Just use a wildcard to make Excel treat the criteria as text...

Try this
=COUNTIF(A1:A10,"010020*")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)




"c mateland" wrote in message
oups.com...
Excel 2003

I'm trying to do a simple countif. In column A, I have...

A
010020
010020
010020
010020
10020
10020

In another cell, I have =COUNTIF(A:A,"010020"), which results in 6,
when I expect 4. It's counting the 10020 entries as well. I want an
exact match to the literal criteria I enter.

How do I do that?

Thanks,
Chuck





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Countif not working

On Sun, 2 Sep 2007 20:40:57 -0400, "Ron Coderre"
wrote:

Just use a wildcard to make Excel treat the criteria as text...

Try this
=COUNTIF(A1:A10,"010020*")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)


Learn something new every day here.
--ron
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 not working w/ cells result of SUM and VLOOKUP VettRacer Excel Worksheet Functions 9 June 21st 07 07:04 PM
CountIf Array not working NWO Excel Discussion (Misc queries) 1 March 1st 07 07:48 PM
Countif, not working. Clash Excel Discussion (Misc queries) 2 July 20th 06 11:28 AM
Countif with nested function not working? jshuatree Excel Worksheet Functions 4 July 17th 06 10:48 PM
countif not working Nick Krill Excel Discussion (Misc queries) 4 June 24th 06 07:42 PM


All times are GMT +1. The time now is 05:30 PM.

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"