|
Brought to you by:
Welcome to the Google Sheets Tips newsletter #372, your Monday morning espresso, in spreadsheet form! Hoping your 2026 is off to a great start! I'm feeling positive and optimistic for 2026, but reality has also kept me grounded ;) I've only had one work day so far (kids were off sick most of last week, thankfully both better) and I'm now under the weather myself. But it's not too bad and hopefully will pass within a day or two. I finally published my end-of-year review for 2025, which shares some of the highlights and challenges from last year. Cheers to 2026! π₯ β NewsI. The author, GDE Kanshi Tanaike, looked specifically at the "Apps Script" tag on Stack Overflow. The decline from the 2020 peak is precipitous, from almost 5000 questions per year to less than 500 in 2025. βRead the study here >>β It's also worth reading this take from another GDE, Martin Hawksey, who adds more nuance to what the decline means. And here's an even wider commentary on Stack Overflow's plight as a "canary in techβs new circular coal mine". β Sheets Tip #372: The SWITCH functionIn this tip, we're looking at the unassuming but useful SWITCH function. In this example, we have a dropdown menu that lets us select a level: Beginner, Intermediate, or Expert. Then the SWITCH function converts this choice into a number: 0.75, 0.5, and 0.25 respectively. (This might be a model parameter that is used in downstream calculations.) Here what it looks like in our Sheet: The function in the output cell is: =SWITCH(B4,
"Beginner",0.75,
"Intermediate",0.5,
"Expert",0.25)
The dropdown is in cell B4 in this example. We use the SWITCH function to evaluate an expression (what the user selects in the dropdown) against a list of cases. The function output is the value that corresponds to the first exact match with the expression (i.e. the formula outputs the value corresponding to the dropdown choice). SWITCH is similar to an IFS function, but it can only do exact matching whereas IFS can do comparisons But I think SWITCH is easier to use and understand, so for scenarios like this it's a good choice. Real World Use CaseIt could be something as simple as wanting to assign different values to different groups in your Sheet. For example, dropdown choice "A" is the value 100, whereas dropdown choice "B" is assigned the value 200. SWITCH lets us write a concise formula to handle the change. Or, in the example above, the formula could apply a "risk weight" factor based on experience level. A task performed by a beginner is treated as higher risk, the intermediate as moderate risk, and the expert as lower risk. This allows calculations to scale automatically depending on who is doing the work, without changing the model. ResourcesSee another use case for the SWITCH function and it's secret array property in newsletter #309 from June 2024. If you enjoyed this newsletter, please forward it to a friend who might enjoy it. Have a great week! Cheers, P.S. An interesting thread on the first fully autonomous drive coast-to-coast across the US in a Tesla. |
Get better at working with Google Sheets! Join 50,000 readers to get an actionable tip in your inbox every Monday.
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...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #379, your Monday morning espresso, in spreadsheet form! Anyone else feeling a little overwhelmed with everything AI these days? Every day, panicked people on Twitter are prophesying the end of white-collar jobs. And Block recently announced they are reducing their headcount by 40% (4,000 people) because of AI, so maybe they have a point. But on a visit to a new dentist last month, I still had to fill out a paper form...
Hi Reader, Welcome to the Google Sheets Tips newsletter #378, your Monday morning espresso, in spreadsheet form! Last week, I shared an essay about how weβre at a threshold in 2026 where writing complex formulas from scratch doesn't make sense anymore (and others have come to similar conclusions). Itβs simply no longer economically viable to spend 45 minutes wrestling with syntax when Gemini can generate the same result in seconds. Today, weβre putting that theory to the test with one of the...