How to make multiple charts in excel using vba

  Рет қаралды 36,640

Karina Adcock

Karina Adcock

Күн бұрын

Using one table where the first column is the x values and every other column is the y values in their own charts.
Sub AddCharts()
Dim i As Integer 'rows
Dim j As Integer 'columns
i = Cells(Rows.Count, 1).End(xlUp).Row
For j = 2 To 4
With ActiveSheet.Shapes.AddChart.Chart
.ChartType = xlXYScatter
.SeriesCollection.NewSeries
With .SeriesCollection(1)
.Name = "=" & ActiveSheet.Name & "!" & _
Cells(1, j).Address
.XValues = "=" & ActiveSheet.Name & "!" & _
Range(Cells(2, 1), Cells(i, 1)).Address
.Values = "=" & ActiveSheet.Name & "!" & _
Range(Cells(2, j), Cells(i, j)).Address
End With
.HasLegend = False
End With
Next j
End Sub
Where I got the code from:
www.mrexcel.co...
Different chart types in excel vba: bettersolution...
---------------------------------------------------------------------------------
#exceltutorials #excelvba #excelcharts
SUBSCRIBE: goo.gl/c46YPs
Microsoft Office 365, 2016, Office Insider, Version 1909
These data are related to my PhD research
---------------------------------------------------------------------------------
IF YOU LIKED THIS VIDEO YOU MAY ALSO LIKE:
How to quickly make multiple charts in excel • How to quickly make mu...
How to make panel charts in excel - method 1 • How to make panel char...
How to make a dynamic chart using data validation • How to make a dynamic ...

Пікірлер: 31
@PiroMat15
@PiroMat15 4 жыл бұрын
Right now, I have around 1000 charts to do, and I must say that I love You :) That's piece of code what I was looking for, exactly. Thank You so much.
@karinaadcock
@karinaadcock 5 жыл бұрын
Hope you learnt something new and interesting. Thanks for watching and please Like, Comment and Subscribe.
@Stopcombovers
@Stopcombovers 5 жыл бұрын
I am so glad I found your video!!! Thank you for making it and posting! It’s so refreshing to see a video working with data that resembles mine, you saved me months of trial and error!
@yem.t.3930
@yem.t.3930 4 жыл бұрын
Thank you sooo much Madam! Very clear, easily understandable, clear video and audio ! would be happy for more tutorials ! Cheers !
@SGH-rt6ci
@SGH-rt6ci 3 жыл бұрын
Dear Ms Karina, clear brilliant explanation ! btw your pleasant voice makes this tutorial easy to graps
@esdrasjesustorresramirez5417
@esdrasjesustorresramirez5417 3 жыл бұрын
Thanks for your amazing work. This was a terrific example of Macros.
@JHatLpool
@JHatLpool 3 жыл бұрын
Great demonstration. Nice, clear description. Thanks !
@jonnelderamas4778
@jonnelderamas4778 Ай бұрын
I need to swap the data between the column and rows
@isaaccastillo8628
@isaaccastillo8628 3 жыл бұрын
Thank you so much Karina, Lord Jesus bless you!
@bhavanth1
@bhavanth1 Жыл бұрын
Hy Thanks for the video. Can you also make another one where I can have single chart with 3 values in same chart using VBA. With different colors
@leoricardo5743
@leoricardo5743 4 жыл бұрын
This is the best. Now lets test in and see if it works (here as i have to make 100 similar graphs, each with the same date but 4 series. I was also trying named ranges. Can you add these in?
@prathapg5866
@prathapg5866 3 жыл бұрын
Thank you for your video Karina, I have a couple of questions like is it the same for pie charts too (xlpie) and how to navigate to the respective field after selecting a slice of a pie chart it would be really helpful for me. Thank you
@discozhang9353
@discozhang9353 4 жыл бұрын
I tried exactly same codes, but my charts got all the series instead of only one serie for each graph, is this happen to you before? Thanks a lot
@yaseminatalay1563
@yaseminatalay1563 3 жыл бұрын
Yes, happened to me. make sure your cursor is on a blank cell.
@nhlanhlamakondo5474
@nhlanhlamakondo5474 2 жыл бұрын
@@yaseminatalay1563 thank you , i was struglling with same problen
@zij5224
@zij5224 4 жыл бұрын
Thanks, very helpful! What if I have different X axis? Could you suggest?
@sgdingman
@sgdingman 4 жыл бұрын
Thanks, this is very helpful.
@sandycarr-q7b
@sandycarr-q7b Жыл бұрын
HELLO, how can I plot the columns and align the plots next to each other instead of stack on top of each other?
@viralkumarpatelkpcl339
@viralkumarpatelkpcl339 3 жыл бұрын
I wanted to create one chart with multiple Y variable. So how to create it??
@hopewu7173
@hopewu7173 3 жыл бұрын
May I please know how to add trendline with equation in VBA as well? thanks a lot
@jonnelderamas4778
@jonnelderamas4778 Ай бұрын
I need help with making around 1000 bar graphs at once. Please help me
@frevanneste7595
@frevanneste7595 2 жыл бұрын
Hi, can I Add 2 types of Y values into 1 chart?
@yaseminatalay1563
@yaseminatalay1563 3 жыл бұрын
How can we add the charts on a separate worksheet and prevent them stacking on top of each other?
@karinaadcock
@karinaadcock 3 жыл бұрын
You probably want something like this: kzbin.info/www/bejne/d6DYf4tobJqor68
@yaseminatalay1563
@yaseminatalay1563 3 жыл бұрын
@@karinaadcock Thank you - this is very helpful. I have one more question; what if there are more series for each chart. For example, what if the series repeat starting from row 21 with same date and same column titles but different values in each cell. I have a model output that repeats for 100 series and would like to plot them all. Thanks.
@ShyanakaDananjaya
@ShyanakaDananjaya 4 жыл бұрын
Solution for all the data in one plot: You can set the source data for the interested column by adding .SetSourceData Source:=ActiveSheet.Range("B2:B18") before .ChartType line which would get rid of all the data being plotted in the same chart.
@genson332
@genson332 4 жыл бұрын
Hi thank you very much for this information and detailed explanation. Can you help me to send all created graph to another sheet? I'm so sorry for asking too much. I hope you can help me. Thank you very much
@davidedri4676
@davidedri4676 4 жыл бұрын
not working, it gets all columns in only one plot How can in the same code insert a selection of several columns with the same time base in one graph.
@nasroml12
@nasroml12 5 жыл бұрын
thx a lot, this is so useful
@franciscomelendez3398
@franciscomelendez3398 4 жыл бұрын
not working, it gets all columns in only one plot
How to align charts in a grid in excel using vba
24:16
Karina Adcock
Рет қаралды 3,9 М.
Make Beautiful Excel Charts Like The Economist (file included)
19:07
Leila Gharani
Рет қаралды 509 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
How to make panel charts in excel using sparklines
11:32
Karina Adcock
Рет қаралды 10 М.
Enums(Enumeration): The Key to Cleaner, More Efficient VBA Code
9:58
Excel Macro Mastery
Рет қаралды 33 М.
Excel VBA Objects: Chart Object (Part 1)
17:34
Excel Macro Mania
Рет қаралды 3,7 М.
Displaying a Chart in a UserForm dynamically
17:27
TheDataLabs
Рет қаралды 45 М.
Make Pivot Table from Multiple Sheets in Excel
12:35
Kevin Stratvert
Рет қаралды 344 М.
How To Copy Multiple Excel Charts To Outlook Using VBA
17:19
Sigma Coding
Рет қаралды 6 М.
How to make panel charts in excel - method 1
17:44
Karina Adcock
Рет қаралды 28 М.
How to Create a Dashboard Using Pivot Tables and Charts in Excel (Part 3)
15:19
Excel Campus - Jon
Рет қаралды 2,5 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН