ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MACRO TO UPDATE CHARTS ! (https://www.excelbanter.com/excel-programming/286782-macro-update-charts.html)

flex zax

MACRO TO UPDATE CHARTS !
 

I have several charts on sheet1. Every chart lies between columns A and
AE starting from the top of the sheet to downward. Each chart's source
data start in the first row below the chart and the source data (i.e
setsourcedata) is about 2,3,or 4 rows long(it varies from chart to
chart). Each chart's source data is updated from column A to column AD
only.

- I need a macro that will loop through each chart, click on it, and
update the source data (i.e setsourcedata) to from column A to AE
instead.

I will appreciate any help.

~Flex




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Debra Dalgleish

MACRO TO UPDATE CHARTS !
 
Jon Peltier has sample code that will change the series formulas for all
charts on a sheet. It's the last example on the following page:

http://www.peltiertech.com/Excel/Charts/ChgSrsFmla.html

flex zax wrote:
I have several charts on sheet1. Every chart lies between columns A and
AE starting from the top of the sheet to downward. Each chart's source
data start in the first row below the chart and the source data (i.e
setsourcedata) is about 2,3,or 4 rows long(it varies from chart to
chart). Each chart's source data is updated from column A to column AD
only.

- I need a macro that will loop through each chart, click on it, and
update the source data (i.e setsourcedata) to from column A to AE
instead.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


flex zax

MACRO TO UPDATE CHARTS !
 


Please I really am new to VBA, and would appreciate it if somebody will
create some loops for me based on my described charts, so when I run it
all my data sources get updated.Thanks.

~Flex~

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Debra Dalgleish

MACRO TO UPDATE CHARTS !
 
Did you read the link, or try the code?

It doesn't require any customization. Select the sheet that contains the
chart, and run the code. When prompted, type the string you want to
replace, e.g. :$AD
and at the next prompt, type the new string, e.g. :$AE

If you need help with storing and running macros, David McRitchie has
information:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Also Tushar Mehta has instructions:
http://www.tushar-mehta.com
Under VBA, click on Beyond Excel's Macro Recorder


flex zax wrote:

Please I really am new to VBA, and would appreciate it if somebody will
create some loops for me based on my described charts, so when I run it
all my data sources get updated.Thanks.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


flex zax

MACRO TO UPDATE CHARTS !
 

Thanks Debra! Thanks Jon!
That code is really a masterpiece!! I have struggled with this for a
long time.Pheeew!!!

~Flex~


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Debra Dalgleish

MACRO TO UPDATE CHARTS !
 
You're welcome! Thanks for reporting that you were able to get it working.

flex zax wrote:
Thanks Debra! Thanks Jon!
That code is really a masterpiece!! I have struggled with this for a
long time.Pheeew!!!

~Flex~


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


graph novice

MACRO TO UPDATE CHARTS !
 
does anyone have any suggestions for a macro to update the source data for a chart when it is on a different sheet? i have a couple charts that i have developed based on data in sheet 1. i would like to replicate those charts for data contained in sheet 2, then sheet 3, etc (i have 60 sheets total). the data in sheet 2, sheet 3, etc. is in the exact same location, but just referring to a different project. i've started doing this manually and it will be very time consuming

is there some type of edit/replace feature that i could use in a macro? or a box asking for the new source data sheet (all the data locations remain the same)

any assistance would be greatly appreciated

----- flex zax wrote: ----


I have several charts on sheet1. Every chart lies between columns A an
AE starting from the top of the sheet to downward. Each chart's sourc
data start in the first row below the chart and the source data (i.
setsourcedata) is about 2,3,or 4 rows long(it varies from chart t
chart). Each chart's source data is updated from column A to column A
only

- I need a macro that will loop through each chart, click on it, an
update the source data (i.e setsourcedata) to from column A to A
instead

I will appreciate any help

~Fle




*** Sent via Developersdex http://www.developersdex.com **
Don't just participate in USENET...get rewarded for it


Bob Flanagan

MACRO TO UPDATE CHARTS !
 
Flex, take a look at Quick Charts at http://www.add-ins.com/quickcharts.htm

It is close to what you want.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"graph novice" wrote in message
...
does anyone have any suggestions for a macro to update the source data for

a chart when it is on a different sheet? i have a couple charts that i have
developed based on data in sheet 1. i would like to replicate those charts
for data contained in sheet 2, then sheet 3, etc (i have 60 sheets total).
the data in sheet 2, sheet 3, etc. is in the exact same location, but just
referring to a different project. i've started doing this manually and it
will be very time consuming.

is there some type of edit/replace feature that i could use in a macro? or

a box asking for the new source data sheet (all the data locations remain
the same)?

any assistance would be greatly appreciated.

----- flex zax wrote: -----


I have several charts on sheet1. Every chart lies between columns A

and
AE starting from the top of the sheet to downward. Each chart's

source
data start in the first row below the chart and the source data (i.e
setsourcedata) is about 2,3,or 4 rows long(it varies from chart to
chart). Each chart's source data is updated from column A to column

AD
only.

- I need a macro that will loop through each chart, click on it, and
update the source data (i.e setsourcedata) to from column A to AE
instead.

I will appreciate any help.

~Flex




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com