|
Brought to you by:
Welcome to the Google Sheets Tips newsletter #374, your Monday morning espresso, in spreadsheet form! Coming to you from the cold and snowy East Coast of the US. We didn't quite get the 20 inches of snow forecast earlier in the week, but we did end up getting around 8 - 10 inches of very dry, powdery snow. And with the temps rarely getting above 20 F (-7 C) this week, it's going to stick around for a while yet. School is closed so you'll probably find me and my family and neighbors making the most of the snow: ➜ NewsI. II. Read the full comment here >> III. ➜ Sheets Tip #374: Task list with status barConsider this simple task list that uses checkboxes to indicate when a task has been completed: Let's spruce it up a bit! First, let's add a conditional formatting rule to make it easier to see the items that have been completed. Format > Conditional formatting Then select "Custom formula is" as the format rule and set it to =$B2 I set the formatting to strikethrough and grey cell background, which gives us this effect: Now we'll add a status indicator to show how far through completing the list we are. Under the checkboxes, add this formula: =COUNTIF(B2:B9,TRUE)/8 If your checkboxes are in a different range, you'll need to adjust both the range (B2:B9) and the denominator (the number we divide by, in this case 8). The denominator should equal the total number of checkboxes. Format the cell as a % to show what percent of the checkboxes are checked. Taking it further, we could add a sparkline in the cell under the percent to visually show this: =SPARKLINE(B11,{"charttype","bar";"max",1;"color1","black"}) In this example B11 contains the percent formula. In our Sheet, it looks like this: Let's use HSTACK to tidy it up a bit. Replace the percent and sparkline formulas with this single formula: =HSTACK(COUNTIF(B2:B9,TRUE)/8,SPARKLINE(COUNTIF(B2:B9,TRUE)/8,{"charttype","bar";"max",1;"color1","black"})) This is a rather ghastly formula where the COUNTIF is repeated twice, so let's clear it up with a LET function: =LET(p,COUNTIF(B2:B9,TRUE)/8, HSTACK(p,SPARKLINE(p,{"charttype","bar";"max",1;"color1","black"}))) In our Sheet, it now looks like this: Finally, we can get really fancy and overlay the percent on the sparkline bar chart: The formula now sits in column A (in cell A11). It's a modified version of the HSTACK above that "pushes" the percent value out of its cell (A11) into the adjacent cell (B11), which contains the sparkline. =LET(p,COUNTIF(B2:B9,TRUE)/8,
offset,REPT(CHAR(8194),17+p*14)&TEXT(p,"0%"),
HSTACK(offset,SPARKLINE(p,{"charttype","bar";"max",1;"color1","black"})))
The value "17+p*14" is the amount of the offset, i.e. how many characters to "push" the percent value across. Feel free to experiment with the values to move it closer or further out, especially if you change the width of your columns. If you enjoyed this newsletter, please forward it to a friend who might enjoy it. Have a great week! Cheers, |
Get better at working with Google Sheets! Join 50,000 readers to get an actionable tip in your inbox every Monday.
Hi Reader, Welcome to the Google Sheets Tips newsletter #382, your Monday morning espresso, in spreadsheet form! If you feel like the AI wave is moving faster than you can keep up with, you aren't alone. The gap between "playing with a chatbot" and "building reliable AI systems" feels wider than ever, and that feeling is only increasing with every new AI announcement. For the past couple of months, I’ve been working on a new course to help address this challenge. Next Monday, I’m opening...
Hi Reader, Welcome to the Google Sheets Tips newsletter #381, your Monday morning espresso, in spreadsheet form! Since last week, the weather in the Mid-Atlantic region has been even more volatile than that mission critical spreadsheet your non-technical boss "fixed" recently. We had a day over 80F, followed by a wild 50F drop to temps in the 30's and snow squalls. And later today, we're forecast to have a severe thunderstorm and possible tornadoes. It's threatening enough that schools in...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #380, your Monday morning espresso, in spreadsheet form! I read something online last week (source) that really resonated with me: Joy is a competitive superpower The author gave the example of the US figure skater Alysa Liu, who rocked a huge smile on her way to a gold medal at the recent Winter Olympics. As someone who has a tendency to take things too seriously, this was a good reminder for me to smile more and...