開始使用免費開始

Checking rarer data types

Google Sheets also allows checks for rarer data types beyond number, text, date, and logical. In this exercise you'll use ISURL() to check for website URLs, and ISFORMULA() to check for cells that contain formulas.

ISURL() checks that the text in a cell takes the form of a URL. This includes text that starts with a protocol, like http://, ftp:// and mailto:, and guesses at other text like somewebsite.com.

To make the text into a clickable hyperlink, use HYPERLINK(). This takes the address of a cell containing a URL and optionally the address of a cell containing the text to display, for example HYPERLINK(A1, B1).

ISFORMULA() takes the address of a cell and returns TRUE when that cell contains a formula. For blank cells and cells with fixed values, it returns FALSE.

本練習屬於課程

Google Sheets 中級

檢視課程

練習說明

The column "Olympic team site" contains a URL to the Olympic team for the athlete's nation. In cell I2, there is a formula to create a hyperlink to the USA site.

  • Copy the formula in I2 down as far as I20.
  • In cell A21, use =ISURL(A2) to check if this is a URL.
  • Copy this formula right as far as I21.
  • On row 22, use =ISFORMULA() to check if the cells from A2 to I2 contain formulas.

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習