|
Brought to you by:
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 and then watch as someone typed that into a computer. A good reminder that adoption always lags way behind the technological innovation. Zooming out further though, it's hard to know what the world will look like in 10 years' time, when super intelligence might be as free and abundant as Google Search is today. By then, anything that we do on the computer will be done by AI agents. What sort of careers will my children have then? Will I still be writing Google Sheet tips?!? 😂 Okay, that's enough of crystal ball gazing. Let's put our feet back on the ground. ➜ NewsI.
Interesting! I got access to these functions a couple of days ago and used SHEET to build a dynamic, formula-driven table of contents. I'll share more practical use cases in the coming weeks. I'm interested to see what everyone builds with these. II. ​Read more here >>​ III. ​Read more here >>​ IV.​ It's designed to catch you up on Gemini AI and move you from simply chatting in the Gemini app to building useful AI systems, within Gemini and Google Workspace. I recorded the first video at the end of last week, which is always an exciting milestone in course projects. I'm working hard to get this ready by early April. ➜ Sheets Tip #379: Iterate your way to a solution by sending follow-up prompts to GeminiIn last week's newsletter, we looked at how to use Gemini to generate a formula to extract a phone number from text. It used the difficult to understand REGEX formula, and Gemini was super helpful because the REGEX formulas are notoriously difficult to write yourself because of the challenging syntax. Several readers replied that often your data is not as neat as the example data I used. And they wondered how Gemini would cope with more complex data extraction and how to prompt it. So in this newsletter, let's find out! Last week we started with data that looked like this and Gemini generated a simple REGEX solution: This week, let's assume we have data that's messy, with lots of variation in the telephone number formats: Some numbers have periods, some with parentheses, some with nothing, some with commas, etc. It's a challenging problem to extract them. Let's prompt Gemini with these variations and see how it gets on. Working in the same chat window that I used for last week's formula, I just continue the conversation with a new prompt: I have other data that has telephone numbers in various different formats. Can you extend that REGEX formula to extract any of the following examples?
Emily’s phone number is 415.555.0198, please text her first.
Michael’s phone number is (312) 555-0147, reach out before noon.
Sophia’s phone number is 646 555 0183, try again this afternoon.
Daniel’s phone number is 718,555,0165, leave a voicemail if needed.
Olivia’s phone number is 303-555.0179, confirm the meeting time.
Ensure that it will work to capture any telephone numbers in these sorts of standard type formats with commas, periods, parentheses, and dashes, etc.
After a minute or so, Gemini offered the following REGEX solution, which did extract all of these different variations: =REGEXEXTRACT(B2, "\(?\d{3}[\).\s,-]?\s?\d{3}[\.\s,-]\d{4}") However, the extracted telephone numbers were still all formatted differently. Ideally, we want them in the same format. Let's prompt Gemini to extend the formula: Extend that formula so it formats all of the phone numbers to the same standard output with dashes. After another minute or so, Gemini produced another formula, this time pretty complex and not something that is easily created manually: =IFERROR(REGEXREPLACE(REGEXREPLACE(REGEXEXTRACT(B2, "\(?\d{3}[\).\s,-]?\s?\d{3}[\.\s,-]\d{4}"), "\D", ""), "(\d{3})(\d{3})(\d{4})", "$1-$2-$3"), "No number found") Testing it out and it worked perfectly first time with all of the variations of data: If I had thousands of rows of data like this, using Gemini to build a formula would have saved me a huge amount of time. It would have taken forever to do it manually and perhaps an hour or two to create a universal REGEX formula myself. Skill TakeawayYou'll notice that the prompt from last week and the two prompts from this week are very specific and include:
When you hit all of these points with your prompts, Gemini has a much higher chance of generating a formula that will solve the problem for you. Have fun building your formulas! If you enjoyed this newsletter, please forward it to a friend who might enjoy it. Have a great week! Cheers, P.S. An antidote to the AI-infused panic: the reversible cup!​ |
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 #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...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #377, your Monday morning espresso, in spreadsheet form! Coming to your inbox on a Tuesday this week, because it was a public holiday here in the US yesterday. Today I'm pondering whether it makes sense to write your own formulas anymore. AI tools are getting so good at writing formula syntax (and Apps Script code) that it doesn't make sense (economically at least) to spend hours crafting complex formulas yourself, if...
Brought to you by: Hi Reader, Welcome to the Google Sheets Tips newsletter #376, your Monday morning espresso, in spreadsheet form! I've been using Gemini and Gemini Canvas a lot recently for various projects. It's mind-blowing how quick it is at generating formulas and scripts that work. We're definitely at the threshold (or maybe already past it 🤔) where it doesn't make sense to write your own complex formulas or code from scratch (for specific problems with limited scope). Having said...