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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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