Multiple Line Charts Based on DataRange Sheet

tahirk

New Member
Joined
Nov 14, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
I have 2 sheets in my excel file (Data and DataRanges). DataRanges sheet includes Start & End columns (multiple rows) which represent the range for each graph.

2021-11-15 09_10_04-Window.png


The data sheet includes Data Serial which will represent data in serial for those ranges (start, end) to plot a simple line graph depending on Close (Column B) values.

2021-11-15 09_10_32-Window.png


SP500_3.jpg


Currently, I'm doing it manually which takes a lot of time. Just want to know if there is a way to automate it using VBA.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I have 2 sheets in my excel file (Data and DataRanges). DataRanges sheet includes Start & End columns (multiple rows) which represent the range for each graph.

View attachment 51265

The data sheet includes Data Serial which will represent data in serial for those ranges (start, end) to plot a simple line graph depending on Close (Column B) values.

View attachment 51266

View attachment 51267

Currently, I'm doing it manually which takes a lot of time. Just want to know if there is a way to automate it using VBA.

Here are the 2 sheets:
Data Sheet:
1.xlsx
AB
1Date SerialClose
2117.66
3217.76
4317.72
5417.55
6517.66
7617.5
8717.37
9817.35
10917.47
111017.58
121117.29
131217.3
141317.26
151417.38
161517.48
171617.64
181717.71
191817.52
201917.63
212017.69
222117.49
232217.57
242317.53
252417.63
262517.4
272617.45
282717.44
292817.49
302917.55
313017.54
323117.44
333217.4
343317.35
353417.04
363516.95
373617.11
383717.13
393817.18
403917.11
414017.16
424117.26
434217.3
444317.3
454417.57
464517.67
474617.58
484717.64
494817.93
504918
515017.92
525117.93
535218.07
545318.26
555418.36
565518.46
575618.65
585718.6
595818.78
605919.05
616018.94
626118.89
636218.95
646319.28
656418.91
666519.02
676618.99
686719.23
696819.27
706919.1
717019.44
727119.41
737219.73
747319.68
757419.52
767519.52
777619.63
787719.34
797819.15
807919.25
818019.33
828119.47
838219.68
848319.75
858419.78
868519.83
878619.93
888720.24
898820.41
908920.27
919020.24
Data
Cell Formulas
RangeFormula
A3:A91A3=A2+1

Range Sheet:
1.xlsx
AB
1StartEnd
26190
3540
44160
GraphRanges
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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