How to make multiple charts in excel using vba

  Рет қаралды 34,850

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.com/forum/excel-q...
Different chart types in excel vba: bettersolutions.com/excel/cha...
---------------------------------------------------------------------------------
#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 ...

Пікірлер: 29
@promiseceasar5003
@promiseceasar5003 4 жыл бұрын
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 3 жыл бұрын
Thank you sooo much Madam! Very clear, easily understandable, clear video and audio ! would be happy for more tutorials ! Cheers !
@JHatLpool
@JHatLpool 3 жыл бұрын
Great demonstration. Nice, clear description. Thanks !
@PiroMat15
@PiroMat15 3 жыл бұрын
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.
@esdrasjesustorresramirez5417
@esdrasjesustorresramirez5417 2 жыл бұрын
Thanks for your amazing work. This was a terrific example of Macros.
@SGH-rt6ci
@SGH-rt6ci 3 жыл бұрын
Dear Ms Karina, clear brilliant explanation ! btw your pleasant voice makes this tutorial easy to graps
@karinaadcock
@karinaadcock 5 жыл бұрын
Hope you learnt something new and interesting. Thanks for watching and please Like, Comment and Subscribe.
@nasroml12
@nasroml12 5 жыл бұрын
thx a lot, this is so useful
@sgdingman
@sgdingman 4 жыл бұрын
Thanks, this is very helpful.
@isaaccastillo8628
@isaaccastillo8628 2 жыл бұрын
Thank you so much Karina, Lord Jesus bless you!
@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
@zij5224
@zij5224 4 жыл бұрын
Thanks, very helpful! What if I have different X axis? Could you suggest?
@hopewu7173
@hopewu7173 3 жыл бұрын
May I please know how to add trendline with equation in VBA as well? thanks a lot
@user-dd9lj4hu4x
@user-dd9lj4hu4x Жыл бұрын
HELLO, how can I plot the columns and align the plots next to each other instead of stack on top of each other?
@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
@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 2 жыл бұрын
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
@genson332
@genson332 3 жыл бұрын
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
@viralkumarpatelkpcl339
@viralkumarpatelkpcl339 3 жыл бұрын
I wanted to create one chart with multiple Y variable. So how to create it??
@davidedri4676
@davidedri4676 3 жыл бұрын
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.
@frevanneste7595
@frevanneste7595 Жыл бұрын
Hi, can I Add 2 types of Y values into 1 chart?
@ShyanakaDananjaya
@ShyanakaDananjaya 3 жыл бұрын
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.
@yaseminatalay1563
@yaseminatalay1563 2 жыл бұрын
How can we add the charts on a separate worksheet and prevent them stacking on top of each other?
@karinaadcock
@karinaadcock 2 жыл бұрын
You probably want something like this: kzfaq.info/get/bejne/d9WlgbtjnJvZqYE.html
@yaseminatalay1563
@yaseminatalay1563 2 жыл бұрын
@@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.
@franciscomelendez3398
@franciscomelendez3398 3 жыл бұрын
not working, it gets all columns in only one plot
@0718364448
@0718364448 Жыл бұрын
How to include all three series in one chart
How to align charts in a grid in excel using vba
24:16
Karina Adcock
Рет қаралды 3,6 М.
Excel VBA Introduction Part 50.1 - Introduction to Charts in VBA
1:01:43
WiseOwlTutorials
Рет қаралды 53 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 38 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 21 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 36 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
How to make panel charts in excel using sparklines
11:32
Karina Adcock
Рет қаралды 8 М.
How to Create a Dynamic Chart Range in Excel using Dropdown
12:25
Leila Gharani
Рет қаралды 297 М.
How to make a panel chart in excel - method 2
24:52
Karina Adcock
Рет қаралды 41 М.
Displaying a Chart in a UserForm dynamically
17:27
TheDataLabs
Рет қаралды 42 М.
Dynamic Ranges with VBA
10:08
Marcus Small
Рет қаралды 14 М.
Excel VBA Objects: Chart Object (Part 1)
17:34
Excel Macro Mania
Рет қаралды 2,7 М.
VBA: Dynamic Charts in User Form
12:32
PK: An Excel Expert
Рет қаралды 37 М.
VBA Code to Create & Format Charts in Excel
13:36
Chester Tugwell
Рет қаралды 57 М.
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 379 М.
low battery 🪫
0:10
dednahype
Рет қаралды 1,5 МЛН
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 11 МЛН
Лучший браузер!
0:27
Honey Montana
Рет қаралды 948 М.