Creating Charts Automatically.........

venkat356

New Member
Joined
Jun 9, 2008
Messages
32
Hi,

I need to Create charts Automatically from the data in Excel file.

with data in column A(on Xaxis) VS ColumnB,Column D(on Y axis) like this .....

I tried to do manually with Macro recording on but,when am trying to excute it Am getting error msg:scrolldown failed...

Please suggest me the code or method........

Regards
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hello venkat,

I am certain this is more than you bargained for, but I wrote a set of macros that imports raw data from a log file, massages it, and automatically builds a bunch of charts. It is configurable for that environment. Depending on you data, you can probably skip the import function and use many of the charting and formatting functions. The techniques are all there. Check this site
www.bkelly.ws/macros

If you have any questions, I will try to help. I am not a macro expert, but I did learn one heck of a lot.
 
Upvote 0
It would be helpful if you showed us the code you recorded (the Scrolldown lines are unnecessary and can be deleted). I suspect the problem might be that the code is running with the chart selected rather than a worksheet.
 
Upvote 0
Hi,

I need to Create charts Automatically from the data in Excel file.

with data in column A(on Xaxis) VS ColumnB,Column D(on Y axis) like this .....

I tried to do manually with Macro recording on but,when am trying to excute it Am getting error msg:scrolldown failed...

Please suggest me the code or method........

Regards

Did you try recording it using the Chart Wizard?
 
Upvote 0
Hello John Davis,

Did you try recording it using the Chart Wizard?

I have used record often, what does it matter if I record using the chart Wizard? Do you mean start record, start the chart wizard and execute your steps. Or maybe, start the wizard, then start record? Would it matter? <!-- / message -->
 
Upvote 0
Hello John Davis,



I have used record often, what does it matter if I record using the chart Wizard? Do you mean start record, start the chart wizard and execute your steps. Or maybe, start the wizard, then start record? Would it matter? <!-- / message -->

Sorry, I'm answering late. First you would turn on record a macro, and then the charting wizard. While you're creating your chart you'll also be creating the macro too do it automatically. The you'll have a beginning code which you can then edit and change pertaining too your needs
 
Upvote 0
HI all,

am extremly sorry i didnt give reply......well i tried to record macro its not working.....

i need a mactro to create graphs from the data in columns...

what i did is ...i started macro on..and clicked the chart icon and choosed a type of chart which i need and the selected the data that need to be plotted...then stopped recording the macro.........when i tried to execute this macro its not working and giving error......

can you please suggest me a better way to do this....am looking for a macro so that i can change it and get the plots from different columns

Regards
 
Upvote 0
HI all,

am extremly sorry i didnt give reply......well i tried to record macro its not working.....

i need a mactro to create graphs from the data in columns...

what i did is ...i started macro on..and clicked the chart icon and choosed a type of chart which i need and the selected the data that need to be plotted...then stopped recording the macro.........when i tried to execute this macro its not working and giving error......

can you please suggest me a better way to do this....am looking for a macro so that i can change it and get the plots from different columns

Regards

Here are the steps:

1) Turn on the Macro Recorder

2) Select the Data to be plotted

3) Click the Chart Wizard and makes changes that you desire based on the wizards options.

4) Stop Recording.

Below is the code format I just recorded. It created the chart based on the ranges I highlighted.

Sub Macro7()
'
' Macro7 Macro
' Macro recorded 06/19/2008 by John H. Davis
'

'
Range("D5:E16").Select
Charts.Add
ActiveChart.ChartType = xlLineStacked
ActiveChart.SetSourceData Source:=Sheets("ANNUAL BY BROKER").Range("D5:E16") _
, PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet
End Sub

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,214,893
Messages
6,122,121
Members
449,066
Latest member
Andyg666

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