# Excel Chart

#### Mortenkamstrup

##### New Member
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

### 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
Well, your workbook is required. If it doesn't contain any sensitive data, then you could put it to some cloud storage.

#### JustynaMK

##### Well-known Member
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;

Let me know if it helps.

#### Mortenkamstrup

##### New Member
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

#### JustynaMK

##### Well-known Member
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" ->

#### Mortenkamstrup

##### New Member
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

#### JustynaMK

##### Well-known Member
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.

Replies
1
Views
286
Replies
3
Views
331
Replies
0
Views
466
Replies
7
Views
5K
Replies
9
Views
3K

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.

### Which adblocker are you using?

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

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