Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using =Offset in Charts

I'm trying to update a chart so that it will handle different ranges fluidly. I've read quite a few different articles on setting up a data series that references a named range, which in turn is set up with an =offset. Unfortunately, I just can't make this work.

Say that I have three years of monthly data stored in cells A1:AJ1 (36 columns) on Sheet1 and a chart that presents a simple bar chart with 12 months of data. I want to be able to present any 12 month period from within these 36 months by updating a cell that indicates the first month to present.

Then, let's say that in cell C1, I have an integer stored that keeps track of this first month. If I wanted to present the data in D1:O1 (12 columns), I would want to offset by 4 columns from column A, right? So, I make a range called "period" in which I type the following: =offset(Sheet1!A1,0,Sheet1!C1,0,12).

In my chart, I get to Edit Series, and in the Series Value field, I input "=period", which I think should allow me to change cell C1 and have the chart report on any 12 month period that I want. (note: I also tried entering =Sheet1!period)

But, I get an error as soon as I hit the enter key: "A formula in this worksheet contains one or more invalid references." I think that the problem relates to how I set up the named range, but I don't know what I am doing wrong. Can anybody suggest how I can fix this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using =Offset in Charts

On Monday, July 16, 2012 6:01:25 PM UTC-6, (unknown) wrote:
I'm trying to update a chart so that it will handle different ranges fluidly. I've read quite a few different articles on setting up a data series that references a named range, which in turn is set up with an =offset. Unfortunately, I just can't make this work.

Say that I have three years of monthly data stored in cells A1:AJ1 (36 columns) on Sheet1 and a chart that presents a simple bar chart with 12 months of data. I want to be able to present any 12 month period from within these 36 months by updating a cell that indicates the first month to present.

Then, let's say that in cell C1, I have an integer stored that keeps track of this first month. If I wanted to present the data in D1:O1 (12 columns), I would want to offset by 4 columns from column A, right? So, I make a range called "period" in which I type the following: =offset(Sheet1!A1,0,Sheet1!C1,0,12).

In my chart, I get to Edit Series, and in the Series Value field, I input "=period", which I think should allow me to change cell C1 and have the chart report on any 12 month period that I want. (note: I also tried entering =Sheet1!period)

But, I get an error as soon as I hit the enter key: "A formula in this worksheet contains one or more invalid references." I think that the problem relates to how I set up the named range, but I don't know what I am doing wrong. Can anybody suggest how I can fix this?

Thanks!


I got it. A couple of errors here, but the significant on is that the =offset(Sheet1!A1,0,Sheet1!C1,0,12) is not zero based, so I needed to put a 1 there.

Thanks anyway.
Reply
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
Take active cell value in for loop and offset based on another cellvalue for columns to offset burl_h Excel Programming 0 May 23rd 12 03:20 AM
Charts, HTML, offset Snadyeka Charts and Charting in Excel 8 November 21st 08 05:45 PM
OFFSET Charts - moving data length Paul Dennis Charts and Charting in Excel 0 December 19th 06 05:10 PM
Find, Copy offset to offset on other sheet, Run-time 1004. Finny[_3_] Excel Programming 10 December 7th 06 11:46 PM
Dynamic Charts Offset CSK Charts and Charting in Excel 4 March 17th 06 07:37 PM


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

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

About Us

"It's about Microsoft Excel"