View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Same formula, different results depending on machine?

I used the following formula to define a named range for a chart...

=OFFSET(Sheet1!$C$4,1,0,ROWS(Sheet1!$C:$C)-COUNTIF(Sheet1!$C:$C,"")-4)

On my home PC and both PCs in my staffroom (all Excel 2003) everything
worked perfectly.

However, on a laptop (Excel 2000), the range plotted by the chart was
wrong and I kept getting a message about having more than 32000
points.

Thinking it was a 2000 versus 2003 difference, I swapped to another
laptop with Excel 2003, but the problem remained.

I tracked the problem down to the COUNTIF(Sheet1!$C:$C,"") formula.
On my home and staffroom PCs it counted cells that were blank and
cells rendered blank ("") by an IF formula.

I've had to change the IF formula so that cells I don't want in the
named range are changed to "NO" instead of "" and the formula that
defines the named range is now...

=OFFSET(Sheet1!$C$4,1,0,COUNTIF(Sheet1!$C$5:$C$100 5,"<NO")-1)

Does anybody know why COUNTIF(Sheet1!$C:$C,"") would produce different
results on different machines?

Ken Johnson