vba chart range

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA chart range

VBA chart range

resolvedResolved · Low Priority · Version 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


 

Excel tip:

Jumping Across the Excel Screen

PgDn and PgUp keys scrolls up and down a screen page in most applications.

Alt+PgDn and Alt+PgUp is the equivalent across the spreadsheet.

View all Excel hints and tips


Server loaded in 0.07 secs.