Graph of a varying size

mannsi

New Member
Joined
Jun 10, 2008
Messages
24
Hello,
Sorry if this question has been posted before. I couldn't find it.
I'm making an Excel graph based on a Sql query I run and shows in a different worksheet. My problem is that I get different amount of result each time the query is run but my graph is always of a fixed size. If I set the data range of the graph as something huge I get a bad looking graph.
How can I edit the graph so that it has a big data-range but only shows cells with data in them ?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Thank you for that link.

I seem to have some wierd problem though. I went through the directions in the link but I now I get errors with a formula of mine. I press Ctrl + F3 and chose my "Names in workbook" to be 'Query!Values' (Query being the target worksheet) and in the "refers to" I put the same value as done in the instructions (after modifying my query to return results of the same format as in the instructions) :

=OFFSET(Query!$B$1,1,0,COUNTA(Query!$B:$B)-1,1)

But I keep getting an error saying that the formula that I typed contains an error. I have tried to change the OFFSET parameters but even with

=OFFSET(Query!$B$1,0,0,1,1)

I still get the same error.
Any ideas ?
 
Upvote 0
Is the comma or the semicolon your argument separator. If the latter:

=OFFSET(Query!$B$1;1;0;COUNTA(Query!$B:$B)-1;1)
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,148
Members
449,066
Latest member
Andyg666

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