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!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,751
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,129,579
Messages
5,637,209
Members
416,961
Latest member
sigrid6940

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top