In this tutorial, we will guide you on how to ** Create Charts** With Excel VBA. Let’s get them below!! Get an official version of MS Excel from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
Example
- Firstly, you need to create a sample data in the Excel Spreadsheet.
- In the Excel Worksheet, you have to go to the Developer Tab.
- Then, you need to ** ** select the Visual Basic option under the Code section.
- Now, you have to copy and paste the code given below.
Sub VBAChart()
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
ActiveChart.SetSourceData Source:=Range("Sheet1!$A$1:$E$6")
End Sub
- You need to save the code by selecting it and then close the window.
- Again, you have to go to the Excel Spreadsheet , and click on the Developer Tab.
- You need to choose the Macros option in the Code section.
- Now, you have to make sure that your macro name is selected and click the *Run * button.
- Finally, you need to create automated charts , using macros.
Wrap-Up
We hope that this tutorial gives you guidelines on how to ** Create Charts** With Excel VBA. Please leave a comment in case of any queries, and don’t forget to mention your valuable suggestions as well. Thank you so much for Visiting Our Site!! Continue learning on Geek Excel!! *Read more on Excel Formulas *!!
Read Also:
- Excel Formulas to Remove File Extension from Filename ~ Simple Tricks!!
- How to Rename Multiple Files using Macros (VBA) in Excel 365?
- How to List All Files and Sub-Directories of a Folder in Excel 365?
- Split/Save Each Worksheet of One Workbook as Separate Excel/Txt/Csv/Pdf Files in Excel 365!!
- How to Print Multiple Workbooks/Worksheets from Directories in Excel 365?






Top comments (0)