View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
c mateland c mateland is offline
external usenet poster
 
Posts: 52
Default COUNTIF and leading zeros?

Excel 2003

I'm trying to run a very simple COUNTIF function, and it's not
working. I have a list in column A of many product numbers. They are
all set as text. Some have alpha characters others are pure numbers
with some having leading zeros and others do not. (i.e. T002390, 2390,
002390) The list includes both 2390 and 002390 but only one occurance
each.

With...
F2 = 2390
or
F2 = 002390

I create the function...
=COUNTIF(A:A,F2)

With either criteria, the result is 2 instead of the expected 1.

How can I get the COUNTIF to discern between 2390 and 002390? Is there
a better formula for this purpose?

Thanks,
Chuck