Automation of Text from Web Import

cpfirish

New Member
Joined
May 28, 2014
Messages
3
I need to import data from the census.gov website, specifically historical data. Building Permits Survey > Permits by Metropolitan Area This is the query interface for the website. It creates data sets that look like this. http://www.census.gov/construction/bps/txt/tb3v201401.txt I noticed that the query generates the same urls for the same query every time and was able to figure out the logic behind it. In the example above "tb3v201401" is the section that changes. t is always required and stands for table. 3 is also always required. y stands for year to date, no value is used for current month. V stands for valuation and U for units. The year of the query comes next in this case 2014 followed by the month in a two digit format.

With all that explained what I need is a way to quickly import the year to date December units from now until at least 1980. So a macro that could change the 2014 in the import minus one year and save to a new sheet would be perfect.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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
Back
Top