Game in Excel

Tic Tac Toe


STEPS TO CREATE TIC TAC TOE GAME IN MICROSOFT EXCEL:

Formatting;

1. Large the height and width of maximum 3 rows In H, I, J, column.
2. Select 9 cells.
3. Go on Data Tab, Select Data Validation Ribbon, Select Settings, In Allow select list, in source, Type “X”and “O”, select OK.
4. Select 8 cells in 4 Rows and merge it.
5. In these merged cells Type formula for Logical Test for “X” and For “O”.

Logical Test For “X” and For “O” ;

 =IF(OR(AND(H4="X",H5="X",H6="X"),AND(I4="X",I5="X",I6="X"),AND(J4="X",J5="X",J6="X"),AND(H4="X",I4="X",J4="X"),AND(H5="X",I5="X",J5="X"),AND(H6="X",I6="X",J6="X"),AND(H4="X",I5="X",J6="X"),AND(J4="X",I5="X",H6="X")),"Player X Won",IF(OR(AND(H4="O",H5="O",H6="O"),AND(I4="O",I5="O",I6="O"),AND(J4="O",J5="O",J6="O"),AND(H4="O",I4="O",J4="O"),AND(H5="O",I5="O",J5="O"),AND(H6="O",I6="O",J6="O"),AND(H4="O",I5="O",J6="O"),AND(J4="O",I5="O",H6="O")),"Player O Won",

IF(OR(H4="",H5="",H6="",I4="",I5="",I6="",J4="",J5="",J6="")," ","Match is draw")))

Logical tests to check blank cell and if it’s true than print blank.
Again Formatting;

1. Set Font Size, Font Color, Font Style etc.
2. Apply Formatting rules For Player “X”, Player “O”, & for “match is draw”.

Steps For Conditional Formatting;

i. Go on Home Tab, Select Conditional Formatting Ribbon, and Select New Rule option.
ii. Select a rule type;
Use a formula to determine which cells to format.
Type formula’s for rules;

Conditional Formatting For “X”;

· =select the merge cells=”Player X Won”
· Set Font Color, Border Color & Line styles, & fill color etc.

Conditional Formatting For “O’;

· =select the merge cells=”Player Y Won”
· Set Font Color, Border Color & Line styles, & fill color etc.

Logic For Draw;

· =select the merge cells=”Match Is Draw”
· Set Font Color, Border Color & Line styles, & fill color etc.



How its Work

Download Excel File: