I have three sheets:
Any help would be appreciated...
- Zipcode_Funnel (list of select zip codes)
- Zipper (demographic output)
- Master (reformatted output)
Code:
Sub Zipper()
'
'Description: pull relevant demographic data on select zipcodes
'Pull zipcode from "Zipcode_Funnel" page and places it on "Zipper" page
Call Zipcode_Feed
'Back to "Zipper" page as defualt
Call Go_Back
'Pull data from demographic site and place on "Zipper" page
Rows("4:198").Select
Selection.ClearContents
Selection.QueryTable.Delete
Range("A2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://zipskinny.com/index.php?zip=" & Range("A2"), Destination:=Range("A4"))
.Name = "index.php?zip=" & Range("A2")
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "6,7,9,11,14,15"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
'Automated reformating routine
Call Insert_New_Line
Call Economic_Indicators
Call Go_Back
Call Female_Per_Of_All
Call Go_Back
Call Female_Per_Of_Females
Call Go_Back
Call General_Information
Call Go_Back
Call Male_Female_Median_Age
Call Go_Back
Call Male_Female_Per_Of_All
Call Go_Back
Call Male_Per_Of_All
Call Go_Back
Call Male_Per_of_Males
Call Go_Back
Call Marital_Status
Call Go_Back
Call Median_Household_Income
Call Go_Back
Call Occupation
Call Go_Back
Call Race
Call Go_Back
Call Social_Indicators
Call Go_Back
Call Zipcode
'***Looking for help here; would like to loop through column ("A") on "Zipper_Funnel"Sheet until cell ("A2") is empty***
' Select cell A2, *first line of data*.
Sheets("Zipcode_Funnel").Select
Range("A2").Select
' Set Do loop to stop when an empty cell is reached.
Do Until IsEmpty(ActiveCell)
' Step down 1 row from present location.
ActiveCell.Offset(1, 0).Select
Loop
End Sub