Dynamic Graph going bananas after adding data

DeNelis1

New Member
Joined
Mar 29, 2018
Messages
3
Hello there,

I'm new to this forum so Hello to all.

when adding a new set of data to a dynamic table the Graph goes bananas despite the fact that the graphs is rigged up with defined names and I am not understanding why this is.
the example is very simple - three columns ( a=date; b=qty Yes; c = qty No) These columns are made dynamic and look at the last 7 weeks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello DeNelis1

OK, I am not sure what “goes bananas” mean? Is it doing something it should not do, or not doing something it should do? Would you tell us what is going on in terms that are objective and not subjective so that we can pinpoint the source and hopefully provide a meaningful solution.
 
Upvote 0
it is regarding a weekly updated data set. - I use the below VBA code for it.

Sub CopyPasteTrial()
Range("A2:C2").Select
Selection.Copy
Range("A100000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub

There is a graph attached to this data range and is linked to defined names with an offset in it so that it should update itself.
there are 3 names defined:
Column A - Laatste7dagen: =offset(Sheet1!$A$5;count(sheet1!$A:$A)-7;07;1)
Column B - LaatsteWeekJa:=offset(Sheet1!$B$5;count(sheet1!$B:$B)-7;07;1)
Column C - LaatsteWeekNee: =offset(Sheet1!$C$5;count(sheet1!$C:$C)-7;07;1)

so these are assigned in the grapg and that works well but as soon as I hit that macro the graph is not displaying correctly - the range gets messed up for some reason
 
Upvote 0
Hey DeNelis1

What happens if you copy/paste manually?

Did you verify that the offset is working the way it is intended to work?

Also, my 2 cents here:
The line that finds the last cell could be written better: try using worksheet.rows.count instead of the hard coded 100,000.
You do not need to select anything before you can copy it. Range(“A2:C2”).copy will work just fine.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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