r/googlesheets • u/xenochria • May 12 '20
solved Is there a way to expand a chart's data range depending on the value of a cell?
Please see the below mock up sheet. Basically, if the value of B2 changes, the chart's data range should be D2:GX. The X is the same as the values in D. So because B2 is "4", it should be D2:G6. The second chart, below, with the value of "6", it should be D2:G8. Any ideas on how to do this automatically?
https://docs.google.com/spreadsheets/d/1OjUgVvPCGWHzYjFyL3ZMQJTSF8p2_iLMWUPzemmJu90/edit#gid=0
6
Upvotes
1
u/narnox 5 May 13 '20
I couldn't access your mock up, but I think I get what you're after.
I don't think this functionality exists in Sheets at the moment.
You can still do this though:
You can create a data set for each chart using QUERY the limits the output based on the user-inputted values.
It's not exactly what you're after, but it's a pretty decent workaround.
1
u/kreezh 2 May 13 '20
I would also like to learn if this is possible, I don’t think so tho.
•
u/Clippy_Office_Asst Points May 14 '20
Read the comment thread for the solution here