Using VBA to download data from tables on multiple webpages into Excel

Yankee9204

New Member
Joined
Apr 24, 2013
Messages
1
Hello,

I am a graduate student attempting to do research on US lotteries. I would like to copy the data on the number of Powerball winners from the Powerball website into excel. The data from each drawing is located on separates webpages. The data goes back to 1997, and drawings are twice a week, so there are over 1,600 webpages from which to get data, making copy+paste not feasible.

I don't really care how the data gets into excel- once it's in there, I can manipulate it into a form to make it usable, as long as column headers and the date of the drawing is included. The data for the two most recent drawings are:

http://www.powerball.com/powerball/pb_totalwinners.asp?DrawDate=4/20/2013
and
http://www.powerball.com/powerball/pb_totalwinners.asp?DrawDate=4/17/2013

I need the whole table, including State, Powerball, Powerplay, and Total. The is a drop down menu with all the drawing dates available, so the dates are conveniently listed in the source code of the webpage.

I have seen some relatively similar posts, but I am unsure of how to modify the responses for the Powerball website. Any help on how to do this would be greatly appreciated!
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,276
Do you still need help with this? If so, have a look at code involving XMLhttp and HTMLdocument.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,699
Messages
5,470,257
Members
406,686
Latest member
BNR_ 1980

This Week's Hot Topics

Top