MACRO TO UPDATE CHARTS !

F

flex zax

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
 
F

flex zax

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~
 
D

Debra Dalgleish

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
 
F

flex zax

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

~Flex~
 
D

Debra Dalgleish

You're welcome! Thanks for reporting that you were able to get it working.
 
G

Guest

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
 
B

Bob Flanagan

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 said:
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)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top