Create a Chart with VBA in Excel

Create a Chart with VBA in Excel. Add Chart title. Select location for your chart. Add axis labels. Select the type of chart that you require. Check out my templates page for free and purchased templates https://www.easyexcelanswers.com/templates.html
code
Sub salesvalues()
Dim chtChart As Chart
‘Create a new chart.
Set chtChart = Charts.Add
Set chtChart = chtChart.Location(Where:=xlLocationAsObject, Name:=”Sheet1″)
With chtChart
‘.Name = “”

.ChartType = xlColumnClustered
‘Link to the source data range.
.SetSourceData Source:=Sheets(“Sheet1”).Range(“a2:b7”), _
PlotBy:=xlRows
.HasTitle = True
.ChartTitle.Text = “Sales by Customer”
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = “Customer”
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = “Total Sales”
End With
End Sub
For more help visit my website http://www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.

Contact me regarding customizing this template for your needs.

Excel one-on-one on-line training available. Email me to arrange.

I am able to provide online help on your computer at a reasonable rate.

Check out my next one-hour Excel Webinar
https://www.crowdcast.io/easyexcelanswers

I use a Blue condensor Microphone to record my videos, here is the link
https://amzn.to/37gyyGa

Check out Crowdcast for creating your webinars
https://app.linkmink.com/a/crowdcast/83

If you need to buy Office 2019 follow
https://amzn.to/2VX5dv8

I use Tube Buddy to help promote my videos
Check them out
https://www.Tubebuddy.com/easyexcelanswers

Follow me on Facebook
https://www.facebook.com/easyexcel.answers

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language
http://www.youtube.com/timedtext_cs_panel?c=UCFH2kZykqt-VX5W9waJzYvQ&tab=2

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.

Related Posts

How to Subtract a Percentage in Microsoft Excel : Microsoft Word & Excel

How to Subtract a Percentage in Microsoft Excel : Microsoft Word & Excel

Subscribe Now: http://www.youtube.com/subscription_center?add_user=ehowtech Watch More: http://www.youtube.com/ehowtech Subtracting a percentage in Microsoft Excel is something that is accomplished by comparing the values of two distinct cells in a table. Subtract a percentage in Microsoft Excel with help from a professional programmer, designer, and developer in this free video clip. Expert: Geoph Essex Filmmaker: Victor Varnado Series…

Language »
close
Thanks !

Thanks for sharing this, you are awesome !