View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KMH KMH is offline
external usenet poster
 
Posts: 31
Default Simple VBA Code Working in Excel 2007 but not Excel 2003 #N/A

I have a fairly simple VBA subroutine that turns data labels on/off on a
stacked bar chart as long as the value is not 0 or NA it turns on. The macro
works perfectly in Excel 2007, but stops on the first #N/A value.
The code stops on one of the following 2 simple commands.

Series = Cells(RowNumStart + X - 1, SeriesCol).Value
If WorksheetFunction.IsNA(Cells(RowNumStart + X - 1, ColNum)) Then

What could be causing this. I have checked that the location in the Cells
location is correct. Just as an FYI, this whole macro wasn't required in
Excel 2007 because Excel 2007 won't chart the #N/A value at all, but Excel
2003 charts it as a 0 value. Thanks for your help.
K