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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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