Data types and formatting

Introduction to Google Sheets

James Chapman

Curriculum Manager, DataCamp

Google Sheet data types

  • Types of data seen so far:
    • Numbers
    • Text
    • Dates
    • Currencies
  • Every cell value has a data type
Introduction to Google Sheets

Google Sheet data types

  • Cell data types are automatically detected, but can also be manually assigned

 

  • Data type determines:
    • What operations can be performed on the cell value
    • How the value be displayed
Introduction to Google Sheets

Data type: Number

  • Any number inputted into a cell → Number data type
  • Allow arithmetic operations and other statistical operations
  • Numerical data is right-aligned, by default

The bank account information spreadsheet, with the text data in the Bank column right-aligned.

Introduction to Google Sheets

Changing decimal places

 

The location of the decrease and increase decimal place buttons on the tool bar - sandwiched between the format and percentage buttons.

Introduction to Google Sheets

Reducing decimal places

 

The decrease decimal place button has rounded 0.85 in cell D4 to 0.9.

Introduction to Google Sheets

Adding decimal places

 

The increase decimal place button has added an extra zero to the value in the cell range, D2 to D5.

Introduction to Google Sheets

Data type: Plain text

  • Assigned to cell values if no other data types are detected
  • Can force a cell to Plain text using the Format > Number > Plain text

The format menu, showing the location of the plain text button to force cell contents to the plain text data type

Introduction to Google Sheets

Data type: Plain text

  • Assigned to cell values if no other data types are detected
  • Can force a cell to Plain text by prepending the contents with '
    • Example: '2 and '= 2 + 3
  • Left-aligned by default

The bank account information spreadsheet, with the numerical data left-aligned.

Introduction to Google Sheets

Data type: Date

  • Many different date formats:

    • 2022-07-29
    • 29/7/2022
    • July 29, 2022
  • Can auto-detect many date formats

  • Manually specify or convert dates:
    • Format > Number
  • Right-aligned by default

The location of the Date format button in the format menu.

Introduction to Google Sheets

Data type: Currency

  • Cells starting with $,£, , or other currency symbol, then a number → Currency
  • Right-aligned by default

The bank account information spreadsheet, with the currency data in the Account Fee and Base Payment columns right-aligned.

Introduction to Google Sheets

Data type: Logical

  • Logical/Boolean values: TRUE and FALSE
  • Logical values are case-sensitive
  • Different cases will be converted, e.g., trueTRUE
  • Center-aligned by default
Introduction to Google Sheets

Comparison operators

  • Equal to: =
    • = 1 + 2 = 3TRUE
  • Not equal to: <>
    • = 1 + 2 <> 3FALSE
  • Greater than: >
    • = 1 + 2 > 3FALSE
  • Less than: <
    • = 1 + 2 < 3FALSE
  • Greater than or equal to: >=
    • = 1 + 2 >= 3TRUE
  • Less than or equal to: <=
    • = 1 + 2 <= 3TRUE
Introduction to Google Sheets

Let's practice!

Introduction to Google Sheets

Preparing Video For Download...