Thanks so much for reading my questions. I tried to search the similar questions in the stackoverflow but failed to get the answer...thanks so much if you can help me.
My purpose here is to copy and paste the data from Sheets("Parts") to Sheets("Summary"), and then sort by A column, ignoring the empty cell.
A1: 2.1
A2:
A3: 1.1
A4: 1.2
After sorting :
A1: 1.1
A2: 1.2
A3: 2.1
A4:
The macro is success in the Macro builder but then failed in the worksheet (First row empty). Indeed I try to not copying the empty cell with "SkipBlanks" but not functional...
Sub IEMacro()
Dim Lastcell As Range
Sheets("Parts").Range("A3:A300").Copy
With Sheets("Summary")
Set Lastcell = .Range("A65536").End(xlUp)
.Range("A2", Lastcell).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=False
.Range("A2", Lastcell).Sort Key1:=ActiveCell, Order1:=xlAscending, Header:=xlGuess
End With