Google Sheets – Formatting your data

Once you’ve added your data onto a sheet, you’ll probably want to format it in some way. By default, numbers entered are considered just that, normal numbers, but sometimes you want specific types of numbers, e.g. percentages, currency, dates, times, scientific, numbers to certain decimal points.  Changing the format is easy and can be as easy as a single click.

On the menu shortcut toolbar, you’ll find buttons to change your numbers into a default currency, a percentage, to increase/decrease the number of decimal points, and the shortcut to the number format menu.

Sheets3 - 1 (1)

Changing to currency format

In this example, I have a simple home budget, which I want to change to pounds.

1) Select the data you want to change.

Sheets3 - 2

2) Click on the currency symbol (yours may be different depending on your language settings).

Sheets3 - 3

This changes the format of the numbers to the default currency.

Sheets3 - 4


Changing to percentages

In this example, I have a table where I want to add some exam marks which are percentages.

1) Select the cells where your percentage marks are going to go, including any formulas you may have, for example, here the last row works out the average mark, which of course I also want to be a percentage. Then click on the % sign in the toolbar.

Sheets3 - 5

2) Type in your marks (just the numbers, don’t type the percentage signs or decimal places), and as you’ll see they appear automatically as percentages.

Sheets3 - 6

By default, the percentages are to 2 decimal places, which is a little excessive in this case. So, let’s reduce the number of decimal places by 1.

3) Select the data and click on the reduce decimal point button on the toolbar once.

Sheets3 - 7  Sheets3 - 8

The numbers are now to one decimal place. If I wanted to increase the decimal place I would have used the button to the right with the double 00.

You may be wondering why I selected and formatted the empty cells first and not after the numbers have been entered. Let’s see what happens if you do that.

Clicking on the numbers then choosing the percentage format, produces numbers that are 100x too big.

Sheets3 - 9    Sheets3 - 10

In order to produce the correct percentages, the original numbers need to be divided by 100, e.g. Fred’s mark would be 0.76, changing this to a percentage would then produce the correct 76%. It’s just something to watch out for, as it’s a common mistake.


There are more formats available and these are accessible via the Numbers menu, by clicking on the Numbers button. (This menu is also available via the menu Format>Number).

Sheets3 - 24

I have a sheet set up to work out the hours worked by a teacher. Here we’re going to work with dates, times and hours.

Here’s the whole process, then below are the step-by-step instructions.

Sheets3

1) First, let’s populate the sheet with the dates worked. If I type in just the day and month and press Enter. The sheet will automatically add the year, as this is the default format. It will also always put the current year, if not otherwise stated.

Sheets3 - 11   Sheets3 - 12

Let’s say I’m not interested in the year. So, let’s change the format to just day and month.

2) Select the dates and click the number button (123) in the toolbar. The numbers menu will appear, then select “More Formats” and then “More date and time formats”.

Sheets3 - 13

There are lots of formats here and you also have the option of creating your own, but for now let’s choose the day/month one at the top.

Sheets3 - 14

3) Click on “05/08” and the details of the format will appear at the top. In this case, it will produce a day with double digits, followed by a forward slash, followed by a month with two digits. Click on “Apply”.

Sheets3 - 16

The dates are now formatted (DD/MM).

Sheets3 - 17


Now let’s add the times.

4) Type in the times using this format HH:MM, i.e. 12:30. If you use, for example, 12.30, the sheet will think it’s a normal number.

Sheets3 - 18

Typing in the number using : means the sheet will automatically recognize it’s a time. In this example, I’ve used the 24h clock which is the most common format and is the easiest to work with on a sheet, but you can use a 12h format, but you will have to format it as that.


I now want to work out the hours worked, subtracting the start times in column C from the finish times in column D. I’m going to add a simple formula to work this out for me.

5) Type in the formula =d3-c3 in cell E3 and press Enter.

Sheets3 - 19

Fortunately, Sheets is clever enough to realize that the numbers in column C and D are times and it puts the answer in column E in terms of hours and minutes.

Sheets3 - 20

Now we’re going to copy the formula in E3 across cells E4 to E7. There’s a quick shortcut to do this, which beats typing in the formula every time.

6) Click on cell E3 and then click on the little square on the bottom right of the cell. The cursor will change to a little black cross. Hold it down and drag it to cell E7. The cells should fill with the times as below.

Sheets3 - 21   Sheets3 - 22

Sheets3 - 23

Note, what dragging the formula down actually did was copy the formula to each cell, but also move the references down a row each time. So, =D3-C3 became =D4-C4 and so on. That’s why it works! More on formulas and cell referencing in a future post.


eBooks available on Drive, Forms, Sheets, Docs, Slides, and Sheet Functions:

Baz Roberts (Flipboard / Twitter / Google+)


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s