Hi,
This is my current code that is working
Sub SortSCRA()
Sheets("C&P Output").Select
Columns("a:bku").Select
Selection.Sort Key1:=Range("aye3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.Goto Sheet3.Range("a1"), True
Sheet4.Range("Aye3:Aye12").Copy
Sheet3.Range("b34:b43").PasteSpecial xlPasteValues
Sheet4.Range("g3:g12").Copy
Sheet3.Range("c34:c43").PasteSpecial xlPasteValues
End Sub
But after sorting the data, 2 rows are being sorted in the middle of the sheet.
I want to find these 2 rows - in column A one contains "year" and one contains '"A1"
Then cut and paste them to the top of the sheet.
I've tried several times but can't get this to work.
Help appreciated.
This is my current code that is working
Sub SortSCRA()
Sheets("C&P Output").Select
Columns("a:bku").Select
Selection.Sort Key1:=Range("aye3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.Goto Sheet3.Range("a1"), True
Sheet4.Range("Aye3:Aye12").Copy
Sheet3.Range("b34:b43").PasteSpecial xlPasteValues
Sheet4.Range("g3:g12").Copy
Sheet3.Range("c34:c43").PasteSpecial xlPasteValues
End Sub
But after sorting the data, 2 rows are being sorted in the middle of the sheet.
I want to find these 2 rows - in column A one contains "year" and one contains '"A1"
Then cut and paste them to the top of the sheet.
I've tried several times but can't get this to work.
Help appreciated.