It’s not exactly the same as Wordle but close enough 🙂
I added additional conditional formatting and data validation in version 5:
If you have issues with the macros watch this video from MrExcel.
I kept thinking: Can I recreate Wordle in Excel? It was easier to build this than play it! I guess I’m not good with words.
How to Play
1. In the top left click the ‘New Game’ button to start the timer.
2. One letter at a time type in a 5 letter word starting at the top (Try1).
- Green letter = the letter is in the answer word and is in the correct position.
- Orange letter = the letter is in the answer word but not in the correct position.
- Dark grey letter = the letter is not in the word.
3. Add words until you guess the answer.
4. In the top left click the ‘End Game’ button to stop the timer.
A few details:
- Letters at the bottom aren’t buttons (used to display each letter’s status).
- Conditional formatting rules may take time to update. Note sure why yet.
How Does It Work?
It’s a mix of formulas, vba, and conditional formatting. Unhide sheets words and letters to see more.
- The 5 letter words are in column B.
- vba takes random cell E1 word and pastes it as a value in cell E3.
I created two areas of formulas that the conditional formatting rules use:
…and this one:
I thought of using buttons or text boxes but it’s easier to use ordinary cells.
Here’s a look at the conditional formatting set-up:
…and the conditional formatting formulas:
=AND(MATCH(B2,words!$I$10:$M$10,0)=MATCH(B2,words!$I$3:$M$3,0),B2<>"") =AND(ISNUMBER(MATCH(B2,words!$I$10:$M$10,0)),ISNUMBER(MATCH(B2,words!$I$3:$M$3,0)),B2<>"") =AND(B2<>"",INDEX(words!$H$14:$H$39,MATCH(B2,words!$G$14:$G$39,0)))
I then created three picture links and pasted them into sheet Play.
The vba is nothing fancy but needed for a few tasks:
- setting up a new game (clearing board, starting timer, etc)
- a 2nd button for stopping the timer
Sub Button1_Click() Application.ScreenUpdating = False Call CopyPasteTimeStart Call ClearBoard Range("B5").ClearContents Call AddNewWord Sheet2.Activate Application.ScreenUpdating = True End Sub Sub CopyPasteTimeStart() Range("A1").Select Selection.Copy Range("B4").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone Application.CutCopyMode = False End Sub Sub ClearBoard() Range("All").ClearContents Range("StartLetter").Activate End Sub Sub Button2_Click() Range("A1").Select Selection.Copy Range("B5").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone Application.CutCopyMode = False End Sub Sub AddNewWord() Sheet1.Activate Range("E1").Select Selection.Copy Range("E3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone Application.CutCopyMode = False End Sub
MrExcel’s Helper File
MrExcel created an Excel spreadsheet that provides hints for the game:
I enjoyed auditing his formulas. Some thoughts:
- Dynamic arrays are amazing and have changed Excel forever!
- Xlookup & Sign: =1-SIGN(SUM(XLOOKUP(B8:F8,$Q$9:$Q$34,$R$9:$R$34)))
- Why have I never used the Sign function?
- Formula =FILTER($Q$9:$Q$34,S9:S34,”*”) uses wildcard!
My Best Wordle Today!
Early this morning I had my best wordle game ever solving it in 3 steps!
Here’s another video from MrExcel: World Best Starting Words
About MrExcel (aka Bill Jelen)
Bill Jelen created his help forum over 20 years ago. It’s an incredible free source to answer Excel related questions. Bill also writes/publishes books, offers consulting services, and has a popular YouTube channel.
I attended one of his Excel seminars in 2015:
I can’t count the number of times I’ve thought “Could I make this in Excel?“
My name is Kevin Lehrbass. I’m a data analyst.
My curiosity has kept me learning for many years now. I also have to keep up with all the changes in Excel. So many new features and functions.