View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShadoShryke ShadoShryke is offline
external usenet poster
 
Posts: 2
Default COUNTIF( {local cells}, {number from other sheet})

Thanks!! I gave them to script and showed them how to work it for their
purpose and it does what was needed.

ShadoShryke
(aka James Walker)


__________________________________________________ ___
"T. Valko" wrote in message
...
Typo! That's what I get for copying!

Use SUMPRODUCT instead:
=SUMPRODUCT(--('Sheet 1'!$A$1:$A8, A1)


The correct formula should be:

=SUMPRODUCT(--('Sheet 1'!$A$1:$A8=A1)


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
The problem is that COUNTIF evaluates TEXT numbers and NUMERIC numbers as
being equal. Since Excel only evaluates numbers to 15 digits of precision
what's happening is the digits after the 15th are being converted to 0s
in the calculation and when that happens they're all the same so you get
result of 8.

12450903093004001 evaluates as
12450903093004000

12450903093004002 evaluates as
12450903093004000

Use SUMPRODUCT instead:

=SUMPRODUCT(--('Sheet 1'!$A$1:$A8, A1)


--
Biff
Microsoft Excel MVP


"ShadoShryke" wrote in message
...
We have a group at work that is working with a CSV file that has been
saved with a .XLS extention. They are working this worksheet in Excel
2007, and are having problems with COUNTIF.

The quandry is that they using the COUNTIF variables from two separate
sheets, and trying to get acurate counts. The situation is as such:

Sheet 1 Sheet
2 Formula
A1 12450903093004001 12450903093004001
COUNTIF([Sheet 1]$A$1:$A8, A1)
A2 12450903093004001 12450903093004002
COUNTIF([Sheet 1]$A$1:$A8, A2)
A3 12450903093004001
A4 12450903093004001
A5 12450903093004002
A6 12450903093004002
A7 12450903093004002
A8 12450903093004002


The Results say there are 8 of each number. Not 4 of each as there
really are. I was thinking it was because it was being saved as a CSV
with all the numbers are "numbers as text", but I tested with others
sheets and it should be a working formula.

Has anyone else seen this problem and able to lend a hint?

Thanks,

ShadoShryke