If you have Chess Pieces and Pawns and lacking a Chessboard, don’t worry! You can easily conditional format a chessboard in Google Sheets and take a printout of it. I am going to provide you a chessboard template in Google Sheets and as well as the necessary formula to create one yourself.
A chessboard consists of 64 equal sized squares that you can create using 8 rows and an equal number of columns (8×8) in Google Sheets.
We can use conditional formatting to get the alternating colored squares, normally black and white on the chessboard, in Google Sheets.
You can manually fill each column. Even though there are 64 cells to fill, that won’t take much time. But why should one opt that manual method when there is a simple formula to do that.
My intention in choosing conditional formatting a chessboard over the manual method is to introduce you a new custom formula in Google Sheets. Also this way you can generate the chessboard in a flash.
Custom Formula to Conditional Format a Chessboard in Google Sheets
Before going to use my custom formula in conditional formatting, please follow the below easy steps.
Resize Rows and Columns to Make a Chessboard that is Square in Shape
Resize Rows:
Select the row A1:10 and resize that rows. How?
Click on row # 1 and press and hold the Shift key and then click on row # 10 to select the rows. Right-click to access the context menu and choose “resize rows”.
I am entering 42 pixels as the row height. You can see the default row height is 21 pixels.
Resize Columns:
Similarly select the columns A1:I and resize the column width to 42 pixels.
You can later change the pixels both in row and columns to the size that you want. But make sure that you are using the same number of pixels in both.
Conditional Format Cells to Get Alternating Colored Squares
Now time to conditional format to fill the equally sized squares with alternating colors. One important point to note at this juncture is that the colors should match diagonally.
I mean a straight line from one corner to the other corner on the chessboard must go thru’ the squares containing the same color. I have a very simple formula for that.
In the following step, I am going to conditional format a chessboard in Google Sheets.
First, select the 64 equal sized cells. I mean click on cell B2 and press and hold the Shift key and then click on cell I9.
Go to the menu Format > Conditional formatting…
Enter the below formula in the field provided under the custom formula rule.
Formula:
=mod(row()+column(),2)
Then under the formatting style, select the color black or the color you want. Click “Done”. Your chessboard in Google Sheets is ready.
If you have any doubt entering this formula and selecting the color, then please refer to the below image.
In this chessboard in Sheets, I have additionally included the algebraic notation which will help you describe the moves later. Also removed the gridlines from the View menu.
How to Get the Symbols (Characters) of Black and White Chess Pawns and Pieces in Sheets
Using the CHAR function you can insert the symbols of Chess Pieces and Pawns in Sheets. See the below tables.
Black Pieces and Pawns – Formula in Google Sheets
Formula | Symbols | Name of Pieces and Pawns |
=char(9820) | ♜ | Rook |
=char(9822) | ♞ | Knight |
=char(9821) | ♝ | Bishop |
=char(9818) | ♚ | King |
=char(9819) | ♛ | Queen |
=char(9823) | ♟ | Pawn |
White Pieces and Pawns – Formula in Google Sheets
Formula | Symbols | Name of Pieces and Pawns |
=char(9814) | ♖ | Rook |
=char(9816) | ♘ | Knight |
=char(9815) | ♗ | Bishop |
=char(9813) | ♕ | King |
=char(9812) | ♔ | Queen |
=char(9817) | ♙ | Pawn |
You May Like: Inserting Bullet Points in Google Sheets.
Chessboard Formatting – Formula Logic and Explanation
Formula Logic:
To understand how the custom formula works, you must test it in a Spreadsheet cell, not in conditional formatting.
Open a new tab and in cell B2 enter the same above conditional formatting formula that I have used to conditional format the chessboard.
=mod(row()+column(),2)
Then copy and paste the formula in all the cells in the range B2:I9 as below.
The value 0 and 1 is equal to the Boolean values FALSE and TRUE respectively.
The same automatically happens within the conditional formatting in the selected range. Wherever the formula returns 1, i.e., TRUE, Google Sheets will fill those cells with the selected color (black) in conditional formatting.
Formula Explanation:
See the below formula which is equal to the formula I have used in conditional formatting and equal to the ‘would be’ formula in cell B2.
=mod(2+2,2)
Result: 0
The MOD function returns the remainder after a division. In this formula 4 is the dividend and 2 is the divisor. So the formula returns 0.
In my chessboard formatting formula, I have used the current row number+ current column number as the dividend using the Row and Column functions.
So in cell B3, the formula would be =mod(3+2,2)
which would return 1. The formula in cell C2 would be =mod(2+3,2)
which would also return 1.
This is what happens in all the cells in the selected range in the conditional formatting.
Hope you could clearly understand how to conditional format a Chessboard in Google Sheets. You can download the Chessboard template (copy of my experiment) below.
Any doubt, please drop in comments.