Sheets Tip 218: Amazing In-Cell Sparkline Progress Charts



Hi Reader,

Welcome to the Google Sheets Tips newsletter #218!

_______

Sponsored By

GRID is a friendly data tool for modern teams

With GRID, you can create beautiful reports and analysis, add key insights and explain data to your team in a way that everyone can understand.

_______

➜ Google Sheets Tip #218: Amazing In-Cell Sparkline Progress Charts

Here is your Google Sheets tip, which you can think of as your Monday morning espresso, in spreadsheet form.

For today's tip, we're going to see how to build a sparkline bar chart to show progress towards a goal.

Suppose we have a class with 17 students, and 7 of them have completed their end-of-year project.

We have the value 7 in cell A2, and the value 17 in cell B2:

Then, we can calculate the % complete as follows:

=A2/B2

which gives an answer of 41% in this example (format the number as a % to see this).

To calculate the % remaining, we could do this:

=1-A2/B2

This tells us there are 59% remaining.

We can use an array literal construction to do both of these calculations with a single formula:

={ A2/B2 , 1-A2/B2 }

This creates two data points, the % complete and the % remaining.

Next, we plug this data into our sparkline formula and set the type to be a bar chart:

=SPARKLINE({A2/B2,1-A2/B2},{"charttype","bar"})

Finally, we can set the colors for the sparkline if we wish (here, I'm using hex codes to set the colors):

=SPARKLINE({A2/B2,1-A2/B2} , { "charttype","bar" ; "color1","#FF1493" ; "color2","#FFC0CB" })

In our Sheet:

We can add a border to make it stand out more too.

Alternative Method

We can simplify the sparkline formula slightly, by not using the array literal method.

Instead, we set a max value (equal to B2) as one of the sparkline settings:

=SPARKLINE(A2 , { "charttype","bar" ; "max",B2 ; "color1","#FF1493" })

Note that we can only specify one color now, because we only have a single datapoint for the sparkline data.

The max value is set by the "max" option in the settings, and points to the max value cell.

Example Use Case

Here's an example with a sparkline bar chart, driven by checkboxes, to indicate how far through a checklist I am:

Grab this template here

_______

If you enjoyed this newsletter, please forward it to a friend who might enjoy it.

Have a great week!

Cheers,
Ben

P.S. Chart to determine risk of bear attack

Google Sheets Tips

Get better at working with Google Sheets! Join 50,000 readers to get an actionable tip in your inbox every Monday.

Read more from Google Sheets Tips

Hi Reader, Welcome to the Google Sheets Tips newsletter #364, your Monday morning espresso, in spreadsheet form! Thanks to the hundreds of you who signed up for the Modern Google Sheets course last week. I'm excited to teach the workshops, which start next week. And thanks for your patience with the extra course promotion emails. We're now back to business as usual, with the once-a-week Google Sheets Tips newsletter. Lastly, Happy Halloween! It's a fun night here in our little town. Most of...

Hi Reader, Welcome to the Google Sheets Tips newsletter #363, your Monday Tuesday* morning espresso, in spreadsheet form! (* arriving in your inbox on a Tuesday, because it was Columbus Day in the US yesterday.) Almost two years ago, I launched a course called "The AI Playbook for Google Sheets", which explored how to use basic AI inside Sheets. (Fun fact: this was my last course launch!) A lot has changed since then! Today, Gemini and other AI tools can manipulate data, generate formulas,...

Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #362, your Monday morning espresso, in spreadsheet form! Last week I finished recording and editing all the video lessons for the new Modern Google Sheets course (woohoo!). I keep track of progress in a Google Sheet (where else of course!) using Tables and dropdown chips: (click to enlarge) I'm using Tables extensively now in my Sheets work. I find the benefits over plain data—such as the dropdown chips, table...