Hi All,
I am trying to copy a chart from one sheet to another without the fixed cells coming across, is this possible? As i need to do on mass.
Thanks
Hi All,
I am trying to copy a chart from one sheet to another without the fixed cells coming across, is this possible? As i need to do on mass.
Thanks
It would help us help you if you could provide a sample workbook with non-sensitive data.
Secondly, I have a question about the requirement. Are you saying that you have a chart on Sheet 1 that is based on cells A1:C20 on sheet 1 and you want to copy it to sheet 2 and now have the chart based on cells A1:C20 on sheet 2?
IF this is the case, would you be open to a dashboard approach? That is, instead of having a chart on each sheet. Have the chart on one sheet. On this sheet, you can have a dropdown list of sheet names and when you select a sheet, the data for that sheet is plotted.
One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.
Hi Dflak
Thanks for the response, I have attached an example workbook. Sheet 1 is the original Data, Sheet 2 is a mock up of what I am trying to present as an end result but for each customer.
In reality there will be 90 different customers to present to.
I am open to the dashboard approach if this works for what I am trying to achieve.
Thanks in advance.
Joel
Your data is perfectly organized to support this. I should be able to knock this out tomorrow.
Everything you ever wanted to know about dynamic charting is contained in these two articles.
http://www.utteraccess.com/wiki/inde...Dynamic_Ranges
http://www.utteraccess.com/wiki/inde...namic_Charting
I will regurgitate some of the content here as applied to the specifics of this requirement.
I created a sheet called dashboard to select the customer and to display the chart.
Cell B1 has a List-type data validation using a named dynamic range called
Customer_List which is defined as =OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A)-1,1).
The offset command, done “from scratch” has 5 arguments
- Start cell
- Rows to go down
- Columns to go right
- Number of rows to return
- Number of columns to return
So this range points to the following:
- Start in Cell A2 on the data sheet
- Go down zero rows and over zero columns (so we are still in A2)
- Return a range COUNTA(A:A)-1 rows deep and 1 column wide
The reason for the minus 1 in the COUNTA is that we don’t want to count the header column. With the date provided, this works out to Data!A2:A5. As you add or delete customers to Column A, the dynamic range will change to cover them.
I assumed that the X-axis of your chart is fixed to 12 months and that you will probably be copying and pasting data in. This range is defined as My_Date and it is set to =Data!$D$1:$O$1
The easiest way to set a fixed range is to highlight the range, go to the name box (upper left, below the menu, next to the formula box – it normally shows the topmost, leftmost cell selected) – then type in the name you want to assign. Or you can use the name manager and add it that way.
This brings us to the parameters sheet. I use a parameter sheet to do “scratch” calculations. It contains helper cells and intermediate calculations that keep future calculations from getting too complex.
The parameters sheet can be hidden if you wish.
Cell B1 on the parameter page merely reflects the named range Customer_Name. I assigned this static name to Cell B1 on the Dashboard sheet since I anticipated using it in several places in the workbook.
Cell B2 contains the formula: =MATCH(B1,Data!A:A,0). This formula gets the physical row on the Data sheet on which is found the customer name.
Cell B3 also reflects Customer_Name. I use this cell for the chart title. You may want to concatenate it with some other text, perhaps something reflecting the date range, for a fancier title.
There is one final dynamic range: My_Value =OFFSET(My_Date,Parameters!$B$2-1,0)
From scratch, the offset command has 5 arguments. However, you can also use offset to define a new range in terms of an existing range.
In this case we want to get the value of Cell B2 on the parameters sheet (which varies based on the customer selected) and go down that many rows minus 1 and shift over zero columns. The reason for the -1 is that MATCH starts counting from 1 whereas OFFSET starts counting from zero.
So if we select Customer B, Match tells us it’s on row 3. So the value range to plot is 2 rows below My_Date and zero columns over.
My_Date and My_Value are plotted on the chart using the techniques in the article referenced above.
So when you select a customer, it changes the Match that changes the offset that changes the row that the chart looks at to plot.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks