Skip to content

Instantly share code, notes, and snippets.

@mderazon
Forked from oscarb/README.md
Last active May 30, 2020 14:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mderazon/dc7b46121ab4b0c2db7a6434d952fdd9 to your computer and use it in GitHub Desktop.
Save mderazon/dc7b46121ab4b0c2db7a6434d952fdd9 to your computer and use it in GitHub Desktop.
Formula to check if website in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API

Validate URL in a Google Spreadsheet

Formula to check if URL in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API

Formula

=IF(A1<>"",IF(ISERROR(FIND("non-document-error", INDEX(IMPORTDATA("https://validator.w3.org/nu/?out=json&doc=" & A1),0,2))),"✓","✗"),"")

Output

  • if the address is reachable
  • if the address is not reachable
  • (empty) if the cell A1 is empty

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment