Hi,
I am new to new macros and I can't figure out the code. It keeps deleting column "A" a second time after I have deleted the first time as there was nothing in it and I do not know why.
It also deletes some wording up the top that is exported from a web portal.
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Rows("12:12").Select
Selection.AutoFilter
ActiveSheet.Range("$A$12:$K$6707").AutoFilter Field:=5, Criteria1:=Array( _
"Ballina Shire Council", "Bellingen Shire Council", "Byron Shire Council", _
"Central Coast Council", "Cessnock City Council", "Clarence Valley Council", _
"Coffs Harbour City Council", "Dungog Shire Council", "Kempsey Shire Council", _
"Kyogle Council", "Lake Macquarie City Council", "Lismore City Council", _
"Lord Howe Island Board", "Maitland City Council", "Mid-Coast Council", _
"Muswellbrook Shire Council", "Nambucca Valley Council", "Newcastle City Council" _
, "Port Macquarie-Hastings Council", "Port Stephens Council", _
"Richmond Valley Council", "Singleton Council", "Tenterfield Shire Council", _
"Tweed Shire Council", "Upper Hunter Shire Council", "="), Operator:= _
xlFilterValues
Rows("73:6703").Select
Selection.Delete Shift:=xlUp
Rows("1168:1169").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$12:$K$1169").AutoFilter Field:=5
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.TextToColumns Destination:=Range("F1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4), TrailingMinusNumbers:=True
Selection.NumberFormat = "m/d/yyyy"
Selection.ColumnWidth = 15.14
Columns("H:H").Select
Selection.Style = "Accounting"
Range("E18").Select
ActiveWindow.ScrollColumn = 1
End Sub
I am new to new macros and I can't figure out the code. It keeps deleting column "A" a second time after I have deleted the first time as there was nothing in it and I do not know why.
It also deletes some wording up the top that is exported from a web portal.
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Rows("12:12").Select
Selection.AutoFilter
ActiveSheet.Range("$A$12:$K$6707").AutoFilter Field:=5, Criteria1:=Array( _
"Ballina Shire Council", "Bellingen Shire Council", "Byron Shire Council", _
"Central Coast Council", "Cessnock City Council", "Clarence Valley Council", _
"Coffs Harbour City Council", "Dungog Shire Council", "Kempsey Shire Council", _
"Kyogle Council", "Lake Macquarie City Council", "Lismore City Council", _
"Lord Howe Island Board", "Maitland City Council", "Mid-Coast Council", _
"Muswellbrook Shire Council", "Nambucca Valley Council", "Newcastle City Council" _
, "Port Macquarie-Hastings Council", "Port Stephens Council", _
"Richmond Valley Council", "Singleton Council", "Tenterfield Shire Council", _
"Tweed Shire Council", "Upper Hunter Shire Council", "="), Operator:= _
xlFilterValues
Rows("73:6703").Select
Selection.Delete Shift:=xlUp
Rows("1168:1169").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$12:$K$1169").AutoFilter Field:=5
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.TextToColumns Destination:=Range("F1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4), TrailingMinusNumbers:=True
Selection.NumberFormat = "m/d/yyyy"
Selection.ColumnWidth = 15.14
Columns("H:H").Select
Selection.Style = "Accounting"
Range("E18").Select
ActiveWindow.ScrollColumn = 1
End Sub