View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Farooq Sheri Farooq Sheri is offline
external usenet poster
 
Posts: 37
Default Naming a worksheet as a variable in a Active Chart Series

Thanks for the reply. First of my apologies for misleading you by naming my
sheets as MSC01, MSC02, MSC03,.. The names are all necessary starting with
MSC, it could be STP01, MOIP1 etc.

If I refer to sheets using index number then for each sheet I can find its
name using ActiveSheet.Name and then use this string in the formula. The
question is how to use a string within the formula. Also how can I find the
total number of sheets in workbook?

Thanks again

"Ken Johnson" wrote:

Hi Farooq,
this is only a stab in the dark, and I'm assuming you have less than
100 sheets.
K = K + 1
ActiveChart.SeriesCollection(1).XValues = "='MSC" & IIF(K9,"0","") &
"'!R2C4:R14C4"
inside your loop.
Ken Johnson