What IS*() the data type?
The values contained in each cell (either the things you typed, or the results of formulas) have a data type. Common types include number, text, date and logical.
Sometimes it is useful to check what type of data you have in each cell, since it may not be obvious just from looking at it. Google Sheets has a series of functions with names beginning "IS" that perform these checks, for example, ISTEXT()
takes a cell address like B3
as an input, and returns the logical value TRUE
if the cell contains text, or FALSE
otherwise.
Likewise, ISNUMBER()
checks for numbers in the cell, ISDATE() checks for dates, and ISLOGICAL()
checks for logical values.
The worksheet shows data taken from Wikipedia regarding men's 100m sprint world records.
This exercise is part of the course
Intermediate Google Sheets
Exercise instructions
Check the data types of the first row of sprint data. In cell A21
, there is a formula to check if the value in A2
is numeric.
- Copy the formula right as far as
G21
by dragging the bottom-right corner ofA21
. - In cells
A22
toG22
, check if the values in cellsA2
toG2
are text by writing formulas that callISTEXT()
. - In
A23
toG23
, useISDATE()
to check ifA2
toG2
are dates. - In
A24
toG24
, useISLOGICAL()
to check ifA2
toG2
are logicals.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
