Google Sheets – Cell formatting

The fundamental building blocks of any spreadsheet are the cells. So clearly, it’s important to understand how to use them well. In this post, I will focus on the various ways you can format cells, so that the cells display the information you want, visually look professional and most importantly, will help you understand your data. We’re going to look at:

  • Adding cell borders
  • Filling the cells with colours
  • Changing the position of the data
  • Bolding
  • Font, font size, and text wrap
  • Text rotation

Here’s the whole thing in a GIF. Below it are the step-by-step instructions.

Sheet2b

Adding cell borders

Here I have some data I’ve already inputted, but as you can see it’s not formatted very nicely. So, let’s change that.

1) Select all the data by clicking on cell A1, holding the mouse button and dragging the blue selection that will appear to cell B6, then release the mouse button. You should have all your data selected as per the second picture below.

2) On the menu shortcut toolbar, click on the borders icon.

This opens a drop down menu with various borders options.

The best way to think of the little icons is that they represent a grid of 2 columns and 2 rows. So, for example, the top right icon, will just add borders on the outside of the selection, but not add borders on the inside. The bottom left icon will only add borders to the far left cell and not the left-hand side of the second column.

3) I want to add borders to all the cells, so I’ll select the top-left icon.

4) As you can see it adds borders to all the cells in the selection. Just click on any cell to get rid of the blue selection.

Here we have a table with 3 classes and their performance marks. If you’re following along, type in the data and add normal borders to all the cells, like we did above. We’re going to add thicker horizontal lines to make it easier to read.

Select the cells you want to edit.

Click on the border icon then click on the part of the border you want. Here I’ve chosen to add the thicker line to the bottom line of my cells.

In the lower right-hand corner, click on the Border style icon.

This opens a menu with different line weights and styles. Click on the one you want, Here I’ve chosen a slightly thicker solid line.

As you can see, it’s added a thicker line to the top row.

To select multiple rows, hold down the Ctrl key (Cmd on a Mac) while you select the rows. Here I’ve selected 2 rows.

Then repeat the same process above to add the thicker lines, which makes the table clearer to understand.

We can also add some different styles. Here I’m going to add a double line to the first vertical line. So, select the first column.

Go to the border style icon as before. Click on the icon with the line to the right.

Then click on the Border styles icon.

Here I’m going to add a double line to the table, so select the last option.

You can see the double line in between column A and B.


Filling the cells with colours

Let’s add a bit of colour to the table.

1) Select the top row (A1 to B1).

2) Click on the fill icon.

3) This opens the colour palette. Click on the colour you want.

4) The cells will fill with that colour.


Changing the position of the data in the cells (justification)

By default, text normally is automatically placed to the left of the cell and numbers are placed to the right.

Here I want to put the two column headers in the centre of the cells.

1) Select the two cells (A1 and B1).

2) Click on the justification icon.

3) A drop-down menu will appear, offering 3 options. Put the data to the left, in the centre, or to the right. I want the centre, so I click on that one.

As you see the headers of my table (in the top row) are now positioned in the centre.


Putting the data in bold

1) Select the two top cells as before, and then click on the bold icon “B”.

2) The headers are now in bold.


Changing the font, font size, and selecting text wrap

Here I’ve added in cell A6, the text Test average, just to clarify what the figure in B6 is.

1) Select the all cells.

2) From the menu shortcut toolbar, click on the font menu (by default it’s “Arial”). A list of possible fonts will drop down. Yours may look different to this.

Click on the font you want.

3) Now, let’s change the font size. Click on the font size number, next to the font name. This drops down a menu where you can either select a size, or just type in a size in the box.

I selected size 14. If you notice, the cell with “Test average” is now too big for the cell. I could change the column width, but below I’m going to allow the text to wrap within the cell.

5) Click on the text wrap icon.

6) This offers 3 options:

  • a) if the text is bigger than the cell, it goes across into the cell to the right (unless there is something in that cell)-this is the default
  • b) wrap the text so that all the text stays in the same cell and to do this, the row height changes
  • c) the text is clipped when it gets to the edge of the cell. Note, this is just a visual thing on the sheet, it doesn’t affect the content of the cell, i.e. the original text is still intact.

I want it to wrap the text, so I choose the middle option. Now I can see all the text.


Text rotation

So far, all our text has been horizontal but there are times when we want our text to be displayed at a different angle, for example in headers in a table. Let’s look at how we can do that using the table below. First select the cells you want to rotate (e.g. A1 to D1).

Click on the Text rotation icon. You will be presented with a range of options.

Let’s see what the options look like, going from left to right. Firstly, let’s rotate the headers to “Tilt up”:

Now with “Tilt down”:

Now, with “Stack vertically”.

Now, “rotate up”:

And “Rotate down”:

We can also set the angle of the text by clicking “0º angle” and then selecting one of the angles on offer:

Here I chose 30º:

The best way to learn these things, is to play around with the different options, with different sets of data.


This post is taken from my book “Beginner’s Guide to Google Sheets“, available on Amazon here.

Want to learn more about Google Workspace and Apps Script? The books below are available on Amazon. Just click on a book! (Affiliate links).

JavaScript Fundamentals for Apps Script users

a

Google Apps Script Projects 1
Google Apps Script Projects 2