update source data for plot

wagnersr

New Member
Joined
Feb 19, 2002
Messages
12
I have two columns of data (x,y) that I want to graph. However, I only want to plot a certain range of these values. That's easy enough, but the problem is that those two columns are going to change as I alter some reference cells. Because of that, the range I want to graph moves up and down within the columns. So, every time I tweak one reference cell, I have to manually go through and find the cell that now contains the value I want to start my plot with. I must be able to do this with a combination of Match, Index, Lookup, etc, but the answer has evaded me so far. Any suggestions?

-steve
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
On 2002-02-20 07:18, wagnersr wrote:
I have two columns of data (x,y) that I want to graph. However, I only want to plot a certain range of these values. That's easy enough, but the problem is that those two columns are going to change as I alter some reference cells. Because of that, the range I want to graph moves up and down within the columns. So, every time I tweak one reference cell, I have to manually go through and find the cell that now contains the value I want to start my plot with. I must be able to do this with a combination of Match, Index, Lookup, etc, but the answer has evaded me so far. Any suggestions?

-steve

Not quite sure what your "reference" cells
contain, but consider the following...

Suppose A1:B6 contains...

{"X","Y"
;1,10
;2,20
;3,30
;4,40
;5,50}

...and that you've graphed this data using
this chart SERIES() function...

=SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$6,Sheet1!$B$2:$B$6,1)

Instead, you could make your reference cells D1 (containing the starting value) and E1 (containing the number of values to be graphed). First, create a defined name, Sheet1!range1, with the following reference...

=OFFSET(Sheet1!$A$1,Sheet1!$D$1,,Sheet1!$E$1)

Next, create a defined name, Sheet1!range2, with the following reference...

=OFFSET(Sheet1!range1,,1)

Finally, change your chart's SERIES()function to...

=SERIES(Sheet1!$B$1,Sheet1!range1,Sheet1!range2,1)

...and you should be "good to go".
This message was edited by Mark W. on 2002-02-20 07:45
 
Upvote 0
OK, I couldn't use exactly what you proposed, but by learning about OFFSET and defining names, I did exactly what I wanted! Thanks! :)
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top