A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating a Macro which allows me to change the data series of a ch



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2008, 01:31 PM posted to microsoft.public.excel.charting
Cath
external usenet poster
 
Posts: 28
Default Creating a Macro which allows me to change the data series of a ch

Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to have
two buttons - one for moving to the next column and one to move back to the
previous column. Is this possible ?
--
Thanks
Cath
  #2  
Old October 2nd, 2008, 02:06 PM posted to microsoft.public.excel.charting
Bernard Liengme
external usenet poster
 
Posts: 4,085
Default Creating a Macro which allows me to change the data series of a ch

You do not need a macro
Suppose your data is in A1:ZZ100
Insert a new row 1 and a new column B
In A1 enter the text Column, in B1 enter the column to be plotted (say V)
In B2 enter =INDIRECT($B$2$ROW()) and copy down the column by double
clicking the fill handle
Now use columns A and B to make chart
Change enter in B1 to get different data.

If you would rather use numbers in B1, say 3 for the data in D, then modify
the above to
=INDIRECT(CHAR($B$1+65)&ROW())

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cath" wrote in message
...
Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to
have
two buttons - one for moving to the next column and one to move back to
the
previous column. Is this possible ?
--
Thanks
Cath



  #3  
Old October 2nd, 2008, 02:15 PM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default Creating a Macro which allows me to change the data series of a ch

Hi,

No need for a macro.

You could use formula, such as INDEX, to display values of chosen column.
Then create a chart on this fixed set of data.

You could use a Spinner control to determine which of the 100 columns you
what displayed.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Cath" wrote in message
...
Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to
have
two buttons - one for moving to the next column and one to move back to
the
previous column. Is this possible ?
--
Thanks
Cath


  #4  
Old October 2nd, 2008, 02:36 PM posted to microsoft.public.excel.charting
Bernard Liengme
external usenet poster
 
Posts: 4,085
Default Creating a Macro which allows me to change the data series of a ch

Much more creative than my answer, Andy!
But I do have a bad case of 'flu
best wishes
--
Bernard

"Andy Pope" wrote in message
...
Hi,

No need for a macro.

You could use formula, such as INDEX, to display values of chosen column.
Then create a chart on this fixed set of data.

You could use a Spinner control to determine which of the 100 columns you
what displayed.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Cath" wrote in message
...
Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to
have
two buttons - one for moving to the next column and one to move back to
the
previous column. Is this possible ?
--
Thanks
Cath




  #5  
Old October 2nd, 2008, 02:44 PM posted to microsoft.public.excel.charting
Cath
external usenet poster
 
Posts: 28
Default Creating a Macro which allows me to change the data series of

Thanks works very well!
--
Thanks
Cath


"Bernard Liengme" wrote:

You do not need a macro
Suppose your data is in A1:ZZ100
Insert a new row 1 and a new column B
In A1 enter the text Column, in B1 enter the column to be plotted (say V)
In B2 enter =INDIRECT($B$2$ROW()) and copy down the column by double
clicking the fill handle
Now use columns A and B to make chart
Change enter in B1 to get different data.

If you would rather use numbers in B1, say 3 for the data in D, then modify
the above to
=INDIRECT(CHAR($B$1+65)&ROW())

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Cath" wrote in message
...
Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to
have
two buttons - one for moving to the next column and one to move back to
the
previous column. Is this possible ?
--
Thanks
Cath




  #6  
Old October 2nd, 2008, 02:45 PM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default Creating a Macro which allows me to change the data series of a ch

Thanks' Bernard, but we were both 'singing' from the same sheet on this one


Hope your bout of flu is a short one.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bernard Liengme" wrote in message
...
Much more creative than my answer, Andy!
But I do have a bad case of 'flu
best wishes
--
Bernard

"Andy Pope" wrote in message
...
Hi,

No need for a macro.

You could use formula, such as INDEX, to display values of chosen column.
Then create a chart on this fixed set of data.

You could use a Spinner control to determine which of the 100 columns you
what displayed.

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Cath" wrote in message
...
Scenario : I have a large data table, possibly 100 cols wide and 100
rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to
have
two buttons - one for moving to the next column and one to move back to
the
previous column. Is this possible ?
--
Thanks
Cath





  #7  
Old October 2nd, 2008, 02:56 PM posted to microsoft.public.excel.charting
Cath
external usenet poster
 
Posts: 28
Default Creating a Macro which allows me to change the data series of a ch

Many Thanks
--
Thanks
Cath


"Cath" wrote:

Scenario : I have a large data table, possibly 100 cols wide and 100 rows
deep. I have created a graph built from one column worth of data. Can I
create a macro which when used will move the source of the data to the
nextcolumn, with this being carried out repeatedly.

I only want to display one col at a time in the graph. I would like to have
two buttons - one for moving to the next column and one to move back to the
previous column. Is this possible ?
--
Thanks
Cath

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:10 PM.


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