返回列表 上一主題 發帖

可以幫我寫迴圈並修正錯誤嗎

回復 2# opman


試試看
  1. Option Explicit
  2. Sub 完成跑社()
  3. '
  4. ' 完成跑社 巨集
  5. '
  6. Dim s As Integer, i As Integer
  7. Application.ScreenUpdating = False
  8. For s = 1 To 128
  9.     Range("K2") = s
  10.     For i = 7 To 1 Step -1
  11.         Range("K1") = i
  12.         Columns("F:F").Copy
  13.         With Range("H1").EntireColumn
  14.             .Cells(1).PasteSpecial Paste:=xlPasteValues
  15.             .Replace What:="N", Replacement:="", LookAt:=xlPart
  16.             .Copy
  17.         End With
  18.         Range("C1").PasteSpecial Paste:=xlPasteValues
  19.     Next
  20. Next
  21. Application.CutCopyMode = False
  22. Application.ScreenUpdating = True
  23. End Sub
複製代碼
感恩的心......(在麻辣家族討論區.用心學習會有進步的)
但資源無限,後援有限,  一天1元的贊助,人人有能力.

TOP

        靜思自在 : 是非當教育,讚美作警惕。
返回列表 上一主題