是否可以簡化下面的代碼?有什麼辦法可以縮短這個時間:Excel VBA:簡化長代碼
' Paste last value
Range(Cells(LastRowP + 1, 10), Cells(LastRowP + 1, 10)).Select
Selection.Cut
Range(Cells(LastRowP + 1, 9), Cells(LastRowP + 1, 9)).Select
ActiveSheet.Paste
Range(Cells(LastRowP + 2, 10), Cells(LastRowP + 2, 10)).Select
Selection.Cut
Range(Cells(LastRowP + 2, 9), Cells(LastRowP + 2, 9)).Select
ActiveSheet.Paste
Range(Cells(LastRowP + 3, 10), Cells(LastRowP + 3, 10)).Select
Selection.Cut
Range(Cells(LastRowP + 3, 9), Cells(LastRowP + 3, 9)).Select
ActiveSheet.Paste
並且這個持續到+20。我是新來的VBA和編碼,所以請多多包涵:)