Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
vba chart range

ResolvedVersion 2003

Babawande has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

VBA chart range

Please I will glad if you help me with this problem, how can i use VBA to plot a chart where the X and Y axes are not side by side on a dataset/spreadsheet? Thats the column containing the X axis data is not beside the column containing Y axis data.

RE: VBA chart range

Hi Babawande

Thanks for your question

The code for sourcing non contiguous ranges involves listing each separate range, separated by a comma. An example is given below.

aChart.SetSourceData Source:=Range("Sheet1!$B$2:$C$4,Sheet1!$E$2:$E$4")


Hope this helps

Regards

Stephen

RE: VBA chart range

Hi Stephen

Thanks a lot.

Regards

Wande

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.13 secs.