Understanding Data Types

When adding data into a spreadsheet it often makes an assumption about the type of data that we are using and tries to adjust the formatting to match. In order to make sure that our spreadsheets are using the right type of data, we need to understand the different data types that can be used in a spreadsheet.

spreadsheet_data types

In this image, we have used the drop-down to select a specific type of data. In a spreadsheet the data type we select impacts on not just how the data is used but also how it is formatted. For example, currency will be shown with the currency symbol before it, whereas short dates will use a / symbol in between the numbers that represent day, month, and year.

When working with spreadsheets we work with five major data types:

Integer

an integer is a whole number. This means that there is no decimal point and if we wish to divide by an odd number this will either create an error or the number will be rounded up or down to the nearest whole number. In the next section, we will look at how to create whole numbers in a spreadsheet and include rounding automatically.

Decimal Numbers

In other programs, and also when we are programming we often refer to decimal numbers using their mathematical name of either real numbers or floating-point numbers. In a spreadsheet, a decimal number will be shown with a specific number of places after the decimal point and this can be sent by the user.

A true real number could have an infinite number of decimal places and because this would cause an error with our program these are round it so that they become usable.

Text

Text is also referred to sometimes a string and is used when we wish to add in words or sentences into our spreadsheets . These can be used as titles or to provide the user with more information about the data that is seen on the spreadsheet.

Date and Time

A particularly useful feature of spreadsheets is that they treat dates and times as a specific data type . When you type a date into a spreadsheet , it will automatically format the date to make it more readable for humans. When using dates, we have the option of using either a long format which writes the date out fully, or a short format which uses numbers to represent the day month and year.

Currency

Another useful data type within spreadsheets is the currency data type which allows us to format decimal numbers based upon a particular currency type. Using the currency formats will ensure that the correct currency symbol is placed alongside the numbers which are always rounded to two decimal places.

Activity

Open up your spreadsheet program and save a new spreadsheet as “introduction_course”. You will be using this spreadsheet to create a practical example for each of the lessons within this course.

Create a second word-processed document and save this as “introduction_course_notes”. This will be where you create explanations of your practical work as notes as you move through the course to help you remember what you have studied so far.

Add some data to your newly created spreadsheet and use the data type drop-down to change its format. Take screen captures of how your data changes as he changed the format and add these to your introduction course notes under the heading of understanding data types.