top of page
9d657493-a904-48e4-b46b-e08acb544ddf.png

POSTS

The Hangman Game in Excel: Build It + Play It

  • Writer: Admin
    Admin
  • 5 hours ago
  • 3 min read

Ever wanted a “wow, Excel can do that?” moment? This Hangman game is 100% formula-based (no VBA), uses simple data validation dropdowns, and updates live as you type guesses.

Below is how the workbook works based on the file you shared (Game, Words, HowTo sheets), plus a step-by-step guide to recreate it from scratch and customize it.

PRACTICE MATERIAL OR GAME ON REQUEST!


How the game works

What you see on the Game sheet

  • A Hint (pulled from the word list)

  • The hidden word (stored in the background) and a masked display like

  • A Guess input area (one letter per row)

  • A Wrong letters counter (counts only unique wrong guesses)

  • A Status message: keep going / won / lost

  • A text-based Hangman drawing that progresses as you make mistakes

Image placeholder (use your screenshot): Caption (italic, 12px): Hangman game sheet with Seed, Mode dropdown, guess inputs, wrong letters counter, and the Hangman drawing.Alt text: Excel Hangman game dashboard with seed, mode selection, guessed letters, wrong count, and status.


Spreadsheet game of Hangman with "CELL" hidden, incorrect guesses listed. Status: You lost! Hangman drawing on the right.
The Hangman in Excel

Step-by-step: Create the Hangman workbook

1) Create the word bank (Words sheet)

Make a table with:

  • Word (UPPERCASE)

  • Hint

Example (like your file):

Word

Hint

EXCEL

Spreadsheet tool

POWER BI

Data visualization

PIVOT TABLE

Summarize data quickly

Add “Modes” for the dropdown

On the right side (like column D in your file), list:

  • Random

  • Choose

Create Named Ranges (important for dropdowns)

Create:

  • WordsList → your word column (e.g., Words!$A$2:$A$15)

  • ModeList → your mode list (e.g., Words!$D$2:$D$3)

Excel steps: Formulas → Name Manager → New.

2) Build the controls (Game sheet)

Create three input cells (yellow in your design):

  • Seed (change to new game): numeric input (e.g., 0, 1, 2…)

  • Mode: dropdown from ModeList

  • Choose word: dropdown from WordsList

Data Validation

  • Mode cell → List → =ModeList

  • Choose word cell → List → =WordsList

  • Guess inputs (your guess column) → Text length = 1

3) Pick a random word using the Seed

In your file, the random “Pick #” is calculated with a seeded formula (in H4):

=MOD(ABS($F$3*1103515245+12345),COUNTA(Words!$A$2:$A$100))+1
  • $F$3 = Seed

  • COUNTA(...) = how many words exist

  • Result = row index to pick from

This is the trick that makes the word change when you change Seed (or press F9).

4) Return the hidden word + hint

Hidden Word (your workbook uses B4)

Logic:

  • If Mode = Choose → use selected word (or fallback to random pick)

  • If Mode = Random → always pick randomly

=IF($F$4="Choose",IF($F$5<>"",$F$5,INDEX(Words!$A$2:$A$100,$H$4)),INDEX(Words!$A$2:$A$100,$H$4))

Hint (your workbook uses B3)

=IF($F$4="Choose",IF($F$5="",INDEX(Words!$B$2:$B$100,$H$4),IFERROR(VLOOKUP($F$5,Words!$A$2:$B$100,2,FALSE),"")),INDEX(Words!$B$2:$B$100,$H$4))

✅ This means: if you choose a word manually, the hint is fetched via VLOOKUP.

5) Create the guess input logic

Your file uses guesses in C10:C35.

“Correct?” column (e.g., D10)

Checks if the input is 1 character and exists in the hidden word:

=IF($C10="","",IF(LEN($C10)<>1,"",ISNUMBER(SEARCH(UPPER($C10),$L$3))))

(In your workbook $L$3 mirrors the hidden word.)

“Wrong unique?” column (e.g., E10)

Counts wrong guesses only once (duplicates don’t add penalties):

=IF($C10="","",IF(LEN($C10)<>1,"",IF(COUNTIF($C$10:$C10,$C10)>1,0,IF(ISNUMBER(SEARCH(UPPER($C10),$L$3)),0,1))))

6) Mask and reveal the word

Your workbook shows each character in separate cells (B8:S8), using MID().

Example for the 1st letter cell (your B8):

=IF(MID($L$3,1,1)="","",IF(MID($L$3,1,1)=" "," ",IF(MID($L$3,1,1)="-","-",IF(COUNTIF($C$10:$C$35,MID($L$3,1,1))>0,MID($L$3,1,1),"_"))))

Then you join it into a readable “Word:” line (your B7 concatenates B8:S8 with spaces).

7) Count mistakes + show Win/Loss status

Wrong letters count (your J4)

=MIN(6,SUM($E$10:$E$35))

Status (your K4)

=IF($J$4>=6,"💀 You lost!",IF(COUNTIF($B$8:$S$8,"_")=0,"🏆 You won!","🙂 Keep going"))

8) Draw the Hangman (pure formula)

Your workbook uses a CHOOSE() based on wrong count + line breaks (CHAR(10)). Formula (your J7) conceptually:

=CHOOSE($J$4+1, ".....", "+---+ ...", "+---+ O ...", ... )

Important: enable Wrap Text in that cell so the ASCII art stacks properly.

How to play (quick)

  1. Change Seed (or press F9) to start a new word

  2. Type one letter per row in the yellow input cells

  3. You have 6 unique wrong letters

  4. Switch Mode to Choose if you want to pick a specific word

Official Logo of the Webpage

Transform your data with our data analytics services! From Excel to Power BI with Power Query in the background, drive your business forward!

  • Linkedin
  • Xing
  • RSS
  • 4844455

Contact Us

Address:
83022 Rosenheim, Bavaria

Join Us!

Stay updated with tips & tutorials!

© 2025 By Excelized. | SITE DESIGNED BY RS-TECH

bottom of page