An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

March 19, 2009

Alternative Answers for GoogleLookup

One of the most interesting functions available in Google Spreadsheets is GoogleLookup, which uses an automatically-generated database of facts to find answers for questions like "What's the population of Quebec?" or "How many employees does Google have?".

Unfortunately, the answers aren't always accurate and it would be useful to choose a different result or to edit the existing one. A recent Google Spreadsheet update added a way to change the answer: click on the cell you want to edit, select "More options" and choose one of the other two alternative answers. Maybe Google will go one step further and provide an interface for editing the facts or flagging the facts that are inaccurate.


To use GoogleLookup, create a Google Spreadsheet and type in a cell:
=GoogleLookup("name", "attribute")

Some examples:
=GoogleLookup("Quebec", "population")
=GoogleLookup("Google", "employees")

Google Spreadsheets has a special function that returns information related to the Men's and Women's NCAA Division I Basketball Championship in the US and there's also a function for stock market quotes.

Homework: Create a spreadsheet that displays facts about 20 people, companies or geographical locations by using the Google Sets-powered AutoFill feature to generate the list of entities and GoogleLookup to find the facts. You can make the spreadsheet public and share the address in the comments.

2 comments:

  1. Thankyou. That's *very* interesting, and potentially very useful too.

    The results from a query such as, for example, =GoogleLookup(A2,"Population density") - (where A2 is the name of a country) are a bit varied, and come out as per SqKm, or per SqMile.

    There are two things I can't figure out though (maybe because I am a novice user of Google Spreadsheets):

    (a) How to control the Lookup source (e.g., restricting it to just CIA Factbook for country data).

    (b) How to remove any non-numeric data from the Lookup data retrieved - e.g., the "SQ KM" string from the returned data "9,326,410 SQ KM" for the land area of China, or the string "(July 2008 est.)" from the returned data "1,330,044,544 (July 2008 est.)" population of China.
    (I tried using the functions ABS and INT, but they don't seem to do it.) You cannot operate a calculation on a cell with mixed numeric and text data (it causes a a "VALUE!" error.

    ReplyDelete
  2. Here's mine!
    http://spreadsheets.google.com/ccc?key=pgKhL-XnwQkiTTG6kc0gzfw

    ReplyDelete

Note: Only a member of this blog may post a comment.