LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Graph Data Range not fixed

Hello everyone!

I am trying to create a macro that will change my graph's
data range in function of a specific cell's data.

So, for example, if my cell a1 = Month3, I want my graph
data range to be from a5 to d5.

but, if my cell a1= month5, I want the graph data range to
be from a5 to F5.

I tried recording the macro and selecting my data range
using this when I go to the graph/source data/data range --
- =indirect(a1)

But then, it just takes this indirect a1 and makes it into
the given range (for example month3 turns out to make my
data range--- =a5:d5

Hope this is not too confusing.

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Sheets("OEE Raw
Data").Range("A5:F6"), _
PlotBy:=xlRows

The 3rd line is what I need to change I think...
source:=indirect type of function thing...

Can anyone help?

Thanks

Pitbull
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I determine which data in a range add up to a fixed number? Mray Excel Worksheet Functions 5 May 27th 10 09:04 PM
Change data range graph from 0-60 to 40-60 Change Data range in graph Charts and Charting in Excel 1 December 28th 07 07:49 PM
Data Range Is Backward on Graph jaygreg Charts and Charting in Excel 2 November 23rd 07 05:20 PM
lookup range of numbers; return corresponding data for the fixed r mmpfa07 Excel Worksheet Functions 1 May 2nd 07 07:33 PM
Charts forget range or data; fixed by manual alteration then Undo Garth T Kidd Charts and Charting in Excel 1 February 8th 07 03:23 PM


All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"