Excel Game Tutorials

by James Highland
If your McAfee program is not to your liking, request a refund within 30 days.

If your McAfee program is not to your liking, request a refund within 30 days.

Microsoft Excel is a versatile program capable of many tasks. Data management, charts, and reports are commonly created using the program. But Excel's tool set extends to a wide variety of applications, limited only by creativity. The combination of formulas, graphics control, and integrated Visual Basic programming make the program suited to games.

Conditional Statements

It is possible to build engaging applications in Excel using nothing more than its built-in conditional formulas. In particular, the "If" statement allows for considerable interactivity when used with trivia-like questions. The program can track a user's answers and offer the percentage of accuracy in her responses. In this way, a game in this design could even be used as a fun productivity tool to measure an employee's knowledge on a certain subject. The concept is simple. The Excel spreadsheet contains a series of questions. On a separate sheet, or in a separate column, the answers to these questions are listed. To prevent the user from seeing the answers, the cells containing their text can be hidden by using the security features of the program. The Protection area of each Format Cells dialog box for the answer cells can be set in combination with the overall sheet security settings provided in the Tools menu. Each question contains three cells: the question itself, a cell for the user's answer, and an adjacent formula cell to compare her response to the correct answer. The comparison cell contains a simple "If" formula to determine if the response cell is identical to the answer cell noted elsewhere in the document. The outcome of the "If" statement can either be "Correct!" or "Wrong!" or whatever the creator wishes. A series of trivia questions or other humorous applications can be implemented in this strategy to create a fun text-based game.

Visual Basic

More aggressive gaming applications can be built in Excel using the Visual Basic programming language. This extends Excel's functionality in many exciting directions. The contents and colors displayed in cells can change on-the-fly, based on user keystrokes or text input. Games resembling the popular Minesweeper program are possible, as well as mazes (See References 1 and 2). The best way to understand the structure of this style of gaming is to view the Visual Basic code of games already written. GameDev.net and Pearson Software Consulting both offer free Excel downloads with open source code for their games.

About the Author

James Highland started writing professionally in 1998. He has written for the New York Institute of Finance and Chron.com. He has an extensive background in financial investing and has taught computer programming courses for two New York companies. He has a Bachelor of Arts in film production from Indiana University.

Photo Credits

  • photo_camera Jupiterimages/Pixland/Getty Images