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

Vytvořeno 3y | 28. 1. 2022 11:21:12


Chcete-li přidat komentář, přihlaste se

Ostatní příspěvky v této skupině

Why Apple iOS 26 might make you want to make phone calls again

Almost every article you’re going to read about Apple’s just-announced iOS 26 operating system f

9. 6. 2025 22:50:01 | Fast company - tech
Whole Foods’ primary distributor goes offline amid rising corporate cyberattacks

Major food wholesaler United Natural Foods (UNFI) announced Monday that it experienced “unauthorized

9. 6. 2025 20:30:05 | Fast company - tech
Apple is stuck in neutral when it comes to personal AI

“At long last, Apple has finally entered the AI race.”

That was the first line i

9. 6. 2025 20:30:04 | Fast company - tech
How Waymo got caught in the crossfire of Los Angeles ICE protests

Waymo vehicles, the self-driving taxis from Google parent company Alphabet, have emerged as a literal flashpoint

9. 6. 2025 20:30:03 | Fast company - tech
Why your phone habits leave you feeling so bad

For those who’ve been in the situation where we unlock our phone and start futzing around on our home screen, only to find ourselves looking up at the clock an hour later with a sense of shame and

9. 6. 2025 18:10:08 | Fast company - tech
The missing key for defense innovation? A good coworking space 

As the director of commercial engagement for the Defense Innovation Unit (DIU), a Department of Defense (DOD) organization that funds startups developing cutting-edge weapons technology for the mi

9. 6. 2025 13:30:10 | Fast company - tech