是否可以简化以下代码?有什么办法可以缩短这个:
' 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 和编码的新手,所以请多多包涵:)