# If checked, add row to data chart?

Basically, I have been working on some automated solutions to show the date and data for the most recent 4 weeks on this data sheet. There are still some bugs to work out, but the last thing I need to figure out is how to graph only the checked rows (in column i). I was aiming for a dynamic chart and my idea as of now is find some sort of formula combination to add the data from columns `D-G` into a separate chunk of cells below somewhere (only if column `i` is checked). Then I would have a graph that is already configured to graph the information in that range. However, I can't seem to find a way to do this. Thank you in advance and if there is a better way to do this, as long as it works, then that's perfect. ## 1 Answer

• create a custom checkbox in data validation and then use simple `IF()` statement: • I was wanting to compare multiple statistics at one time so if more than one box is checked, this doesn't work and I can't figure out how to make it work. – TheMrIggs Jan 14 '19 at 22:43
• @TheMrIggs on next row put another IF from another checkbox etc. and then select those data you created by checking those checkboxes and insert there some nice chart which will show you some neat statistics you need – user0 Jan 14 '19 at 22:51
• Is there a way to move the data next to each other because if I do what you described, there will be spaces in-between the data unless the boxes I check are right next to eachother. – TheMrIggs Jan 14 '19 at 22:54
• @TheMrIggs of course... use array `{}` like: `=IF(A1=1, ARRAYFORMULA({C1,E1,F1,G1}), )` – user0 Jan 14 '19 at 22:57
• Oh I mean vertically. What you're suggesting is I make the table as big as the actual chart which is counter productive. At one time, only 5 or so will be selected. The formula you suggested only fixes the issue horizontally. Vertically, the data will have huge spaces if the data I select isn't adjacent to eachother. – TheMrIggs Jan 14 '19 at 23:02