Code
Sub Macro3() {Yahoo stock prices spreadsheet [URL]http://sg.finance.yahoo.com/q/hp?s=[/URL] z74.SI&a=00&b=1&c=2012&d=11&e=31&f=2012&g=w}
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+p
'
Dim LastRow As Integer
Dim table As Object
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Sheets("table").Cells.Clear
Worksheets("table").Activate
LastRow = UsedRange.Row - 1 + UsedRange.Rows.Count
Sort.SortFields.Add Key:=Range("A2:A" & LastRow), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With Sort
.SetRange Range("A1:G" & LastRow)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Display More