Memory Game – Pattern Matching

I saw this memory game a few days back. The website promised an instant boost in the players memory if they played this game for a 4 week period. So if you’ve been wondering how to get that ‘excel’-ent memory, here’s the prefect game for you.

The Memory Game

The game is pretty straightforward. You are shown a grid of cells, some of which are colored and some are left blank. Once you’ve memorized the pattern of the colored cells, the entire grid is turned blank. Now using only your memory, you try to click and highlight the cells which you thought had color in them. If you click a wrong cell, you lose. If you click all the right ones, you win. Simple as that.


memory-game-excelYou can set the difficulty level from the the lowest (2) to highest (10). Each level in this memory game represents the number of cells that will be used to construct the grid – the higher the level, the more complex the game. It took me about 2 hours to rig up this game so this may not be completely error proof though I’ve tried to fix all the ones that I could find. Its interesting to see how the complexity increases exponentially as the one changes the level. The game pretty much became unplayable for me after the seventh level. Check out this memory game and let me know the highest level you were able to complete successfully.

Making the Memory Game

1. Open a blank excel spreadsheet. Open the VBA editor.
2. Create a range variable whose area is in proportion to the level of the game (ror example pick a 3 x 3 range for a Level 3 game).
3. Color each of the cells in the range randomly and remember the pattern. You can use an two dimensional array to store the values.
4. Using the Worksheet_SelectionChange subroutine to highlight the cells that the player picks as his / her goes along.
5. After each selection by the player, compare the selection with the array and see if they match. If yes and if all the cells match, the player wins. However if a wrong cell was selected, the player looses.

You can download the memory game here or click on the button below:


Excel Formula, Excel Chart, Excel Macro, Excel VBA, Pivot Table Excel, Excel Dashboard

What Do You Think ?

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Comments and Trackbacks

  1. Ben wrote:

    good day! can you guide me step by step in making this one? I need this for our major project


Keep up with the latest stories - Delivered right to your inbox


English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagDutch flagHindi flagFilipino flagIndonesian flagThai flagTurkish flagPersian flag
treeemap software for excel