Website Data Retriever (VBA for Excel)

This was a VBA for Excel project. The purpose of this program was to download and process data from the website http://www.us-lotteries.com.  The program would crawl through the websites pages looking for the lottery data of the different years and months. In the end the lottery data was sorted and printed in the Excel sheet . . .

 

Project Requirements:

  • VBA
  • Excel
  • Web Scrapping

Project Discription:

In the website http://www.us-lotteries.com the results of all the US lotteries are recorded. For example in the link below the results of all the lotteries in Arizona during the year 2013 can be seen:

http://www.us-lotteries.com/Arizona/Pick_3/Calendars/Arizona-Pick_3-2013-winning_numbers.asp

The client wanted a program with the following input:

  • User would be able to select the state to retreive the data from
  • User can select an interval to retrieve the data from (a start date and an end date)
And the program would retrieve the associated data from the website. The data would be printed in two columns. In one column data would be sorted from recent to latest, and in the other form latest to recent.
There was also  a lot of complexity involved with this project. Some of the states had 2 draws each day. Other states didn’t have any draws at all on some days of the year. These variations added complexity the the project.
In the figure below you can see the websites main page. By clicking on each of these links you will get the lottery result for its assocated state:
7.1

After choosing a state you will need to choose the lotteries year:

4.1
In the figure below you can see the lottery result for the Colorado state during the year 2014:

1.1
In the figure below you can see the lottery results for California during the year 2014. As you can see there were 2 draws per day:

5.1
The user can select which state to retrieve the data from the drop down list provided:

2.1
The user can select the start and end dates to get the data from the date selection options provided:

3.1
In the end the results are printed:

6.1

If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website  www.software-solutions-online.com

Live Chat