The Excel Web Query and Predicting the Washington State Governor's Race

Web Queries in Excel let you grab tabular data off of a web page without writing any code or messing with web services. I use this feature all the time as a manager trying to grab internal business data off of many different systems in order to analyze it. In this example, I build a computer model of the political race. The entire project can be done in less than 20 minutes.

  1. Open Excel 2003

  2. Choose Data | Import External Data | New Web Query...

  3. Browse to and select the table that lists ballots left to be counted by county. 

  4. After the table is imported do it again for the results in the race found so far found at

  5. You should now have both tables side-by-side in Excel. You can color and format them however you like:

  6. Create further columns to find the percentage a candidate gets from each county and then multiply that percentage against the remaining ballots in that county.

  7. Finally, total the projected votes with the votes a candidate already has and you will arrive at a projected final outcome.

  8. Now here is the really cool part: whenever new totals are posted on the web sites you can update your spreadsheet with Data | Refresh Data. Excel keeps your nice formatting and fomulas and just gives you the new numbers.

A final solution can be downloaded here.