开始使用免费开始使用

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.

本练习是课程的一部分

Google Sheets 中级

查看课程

练习说明

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 of A21.
  • In cells A22 to G22, check if the values in cells A2 to G2 are text by writing formulas that call ISTEXT().
  • In A23 to G23, use ISDATE() to check if A2 to G2 are dates.
  • In A24 to G24, use ISLOGICAL() to check if A2 to G2 are logicals.

动手互动练习

通过我们的互动练习之一,将理论转化为实践

开始练习