Excel Chart

Mortenkamstrup

New Member
Joined
Nov 5, 2016
Messages
26
Dear all

I have made a Chart which automatically update the new data which I put in the Excel. (New data are added by a Macro command button)
Now i would like the excel chart to extend with 1 cell every time the new data extend with 1 cell.
Planning to use the same Macro command button so whenever i update Data i will automatically extend the chart side as well

Any ideas which can be used/tried are highly appreciated :D

Thanks in advance :)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Sektor

Well-known Member
Joined
May 6, 2011
Messages
2,874
Office Version
  1. 365
Platform
  1. Windows
Well, your workbook is required. If it doesn't contain any sensitive data, then you could put it to some cloud storage.
 
Upvote 0

JustynaMK

Well-known Member
Joined
Aug 28, 2016
Messages
674
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
ADVERTISEMENT
Hey, thanks for the file!

We cannot put a dynamic range into "Chart data range", so the only solution is to (unfortunately) create a separate dynamic range for each row:
For "week number": =OFFSET(Sheet1!$C$6,0,0,1,COUNTA(Sheet1!$6:$6)-1)
For "squat": =OFFSET(Sheet1!$C$7,0,0,1,COUNTA(Sheet1!$7:$7)-1)
(...)
For "support": =OFFSET(Sheet1!$C$10,0,0,1,COUNTA(Sheet1!$10:$10)-1)

Then in your chart you would need to:
a. leave "Chart data range" blank;
b. add 5 series, each with Series Name referenced to (B7, B8..., B10) and with your dynamic ranges (i.e. =Book2.xls!squat) respectively;
c. add =Book2.xls!WeekNumber as your Axis Label Range

Let me know if it helps.
 
Upvote 0

Mortenkamstrup

New Member
Joined
Nov 5, 2016
Messages
26
Hey thanks for the answer :)
Not sure if i understand it correctly :)
Should i make a Chart For each serie (1 for weeknumber, squat... Support) and then get the 5 different charts in one Chart?
I am not sure how to make the separate dynamic range for each row and get them to gether :)
 
Upvote 0

JustynaMK

Well-known Member
Joined
Aug 28, 2016
Messages
674
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
ADVERTISEMENT
Hi Mortenkamstrup,
Sorry for the delay, I just noticed your reply! Create just one chart and link 5 separate dynamic ranges. So:
1st step: create 5 dynamic ranges (one for each row: from "week number" to "support")
2nd step: insert blank line chart, right-click > Select Data
3rd step: leave "Chart data range" blank
4th step: add 5 series (Legend Entries (Series) > Add), each with Series Name referenced to (B7, B8..., B10) and with your dynamic ranges (i.e. =Book2.xls!squat) respectively;
5th step: modify "Horizontal (Category) Axis Labels" ->
add =Book2.xls!WeekNumber as your Axis Label Range
 
Upvote 0

Mortenkamstrup

New Member
Joined
Nov 5, 2016
Messages
26
Hi JustynaMK
Thanks for the answer. Will these 5 steps make it so if i have 6 columns of data then my Chart area will be 6 columns wide, and if i have 10 columns then my Chart area will be 10 columns wide?

I allready have the dynamic data inside the Chart Area :)
 
Upvote 0

JustynaMK

Well-known Member
Joined
Aug 28, 2016
Messages
674
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Exactly, that's going to happen :) your chart will be dynamic and expand automatically whenever you add new columns. Let me know if you need any help with adjusting the chart / you can send it to me.
 
Upvote 0

Forum statistics

Threads
1,195,600
Messages
6,010,651
Members
441,558
Latest member
lambierules

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
Top