How I recreated Wordle in Google Sheets

I first noticed them about two weeks ago: the squares. Grids of black, orange, and green square emoji flooding my Twitter feed. The people posting them seemed to be happy about them. It turned out they came from a game: Wordle, a daily word-guessing game by artist/programmer Josh Wardle. It’s simple enough: there’s a new word each day, and you have six chances to guess it. Get it right, and you get a cute little emoji grid to show off how you did. With the rise of Wordle came the imitators, and while some have chosen to copy Wordle’s entire gimmick (the worst offenders were removed from the iOS App Store), the really fun ones put their own spin on it—there’s a bunch over on Glitch, like Horsle (spoiler: the word is always “horse”). As a part-time spreadsheet artist, I wanted to see if Wordle could be adapted to my medium of choice: Google Sheets. And here’s the result: SHEETLE! It’s a self-contained, mostly complete copy of Wordle, with daily words and six guesses and everything—all running in Google Sheets. Once you’ve made a new copy of Sheetle, you can look behind the curtain by right-clicking on row 12, and selecting Unhide rows. That’ll reveal rows 1-11, where all the magic happens. It works using three lesser-known Google Sheets features, which can pull off some really interesting things when combined. Put super briefly, here’s what’s happening behind the scenes.

  1. Start with good data When starting a new spreadsheet, one of the more daunting tasks is always data entry. Luckily, with projects like this, it’s highly likely that the work can be done automatically (hi, Zapier!) or that someone has already done that work for you. In this case, I went to GitHub and searched for “five-letter words,” which brought me to Chaz Reid’s aptly named “five-letter-words” project, which does what it says on the tin: creates a big list of five-letter words. Thanks to Chaz using the MIT license, I can safely use that data in my own project, and not spend days manually entering every five-letter word I can think of. Google Sheets has several functions for importing data, but since the words I was using each had their own row, I could use IMPORTDATA. Usually, that would create a new row for each line in the document, but since I only wanted one word at a time, I used INDEX to tell the sheet which specific row to stick to, and UPPER to make it uppercase.
  2. Recalculation and iterative calculation No wait, come back! Google Sheets make these features sound way scarier than they actually are, and enabling them can take your sheets to a whole new level. You can find them in your spreadsheet under File > Settings > Calculation. Recalculation changes how often your formulas recheck their math, and Iterative calculation changes how many times they perform that check. In this case, I have Sheetle check its formulas any time something changes and every hour, and when it does that, it rechecks everything one extra time. The added perk of this is now your cells can have formulas that reference themselves (yes, your sheets are now self-aware!), allowing you to turn checkboxes into buttons, build whole games from scratch, or (with a little extra math) start making 3D graphics, all right there in your spreadsheet. For Sheetle, they help grab the player’s guess each time they hit the Submit button, and add it to the list of guesses.
  3. Hidden ranges When you select multiple cells in Google Sheets, you’ll often see text like “A1:B3” appear. That’s called a range, and it’s how Google Sheets knows that there are actually several items that it should be paying attention to in the formula. Normally, Sheets will want to look at all of those items at once, but by using functions like ARRAYFORMULA, you can tell it to do something with each value dynamically. For example, to create the little emoji grid, I wanted to compare each letter of each guess to each letter of the final answer, so I split them up and used ARRAYFORMULA to compare each one. If left alone, ranges can take up quite a bit of space, which isn’t always great. To condense the results into one cell, I’ve dropped in TEXTJOIN and REGEXREPLACE functions, which bring the results back into one place and add line returns where needed. Put together, I split up the answer and guesses to create two new ranges, using ARRAYFORMULA to compare them, then TEXTJOIN and REGEXREPLACE to make them disappear again. It’s like the ranges were never there! A new kind of art project This is the secret fourth trick—a special treat for making it this far: just keep trying stuff. There’s no right way to make Wordle in a spreadsheet! And the only “wrong” way to make something is to not make it. The only reason I learned all of what you just read is because I asked, “I wonder if that could work” and kept trying stuff until it did. Yes, it’s a spreadsheet, but if you approach it like an art project, and—dare I say—try to have fun with it, you’ll stumble into solutions that you wouldn’t have considered otherwise. Or, if spreadsheets aren’t your thing, maybe take up crochet, or scrapbooking. What I’m trying to say is that times are hard, and you deserve to be happy. If you get stuck, Google’s documentation is a lifesaver, or you can check out my portfolio (yes, another spreadsheet) for more examples, or join my tiny, spreadsheet-focused Discord server, Sheet Street. Happy sheeting! ????

This article originally appeared on Zapier’s blog and is reprinted with permission.

https://www.fastcompany.com/90716633/how-i-recreated-wordle-in-google-sheets?partner=rss&utm_source=rss&utm_medium=feed&utm_campaign=rss+fastcompany&utm_content=rss

Utworzony 4y | 28 sty 2022, 11:21:12


Zaloguj się, aby dodać komentarz

Inne posty w tej grupie

A newly discovered exoplanet rekindles humanity’s oldest question: Are we alone?

Child psychologists tell us that around the age of five or six, children begin to seriously contemplate the world around them. It’s a glorious moment every parent recognizes—when young minds start

13 lip 2025, 11:10:06 | Fast company - tech
How Watch Duty became a go-to app during natural disasters

During January’s unprecedented wildfires in Los Angeles, Watch Duty—a digital platform providing real-time fire data—became the go-to app for tracking the unfolding disaster and is credit

13 lip 2025, 06:30:05 | Fast company - tech
Why the AI pin won’t be the next iPhone

One of the most frequent questions I’ve been getting from business execs lately is whether the

12 lip 2025, 12:10:02 | Fast company - tech
Microsoft will soon delete your Authenticator passwords. Here are 3 password manager alternatives

Users of Microsoft apps are having a rough year. First, in May, the Windows maker

12 lip 2025, 09:40:03 | Fast company - tech
Yahoo Creators platform hits record revenue as publisher bets big on influencer-led content

Yahoo’s bet on creator-led content appears to be paying off. Yahoo Creators, the media company’s publishing platform for creators, had its most lucrative month yet in June.

Launched in M

11 lip 2025, 17:30:04 | Fast company - tech
GameStop’s Nintendo Switch 2 stapler sells for more than $100,000 on eBay after viral mishap

From being the face of memestock mania to going viral for inadvertently stapling the screens of brand-new video game consoles, GameStop is no stranger to infamy.

Last month, during the m

11 lip 2025, 12:50:04 | Fast company - tech
Don’t take the race for ‘superintelligence’ too seriously

The technology industry has always adored its improbably audacious goals and their associated buzzwords. Meta CEO Mark Zuckerberg is among the most enamored. After all, the name “Meta” is the resi

11 lip 2025, 12:50:02 | Fast company - tech