返回列表 上一主題 發帖

[發問] 如何自動複製資料

回復 1# dragonbx
根據圖片內容 簡易做的擴充巨集
  1. Sub Macro2()
  2. '
  3. ' Macro2 Macro
  4. '
  5. ' 快速鍵: Ctrl+e
  6. '
  7.     Range("A3:A7").Select
  8.     Selection.FormulaR1C1 = "=R[-1]C"
  9.     Range("A3:A7").Select
  10.     Selection.AutoFill Destination:=Range("A3:K7"), Type:=xlFillDefault
  11.     Range("A3:K7").Select
  12.     Range("A9:A13").Select
  13.     ActiveCell.FormulaR1C1 = "=R[-1]C"
  14.     Range("A9:A13").Select
  15.     Selection.FormulaR1C1 = "=R[-1]C"
  16.     Selection.AutoFill Destination:=Range("A9:K13"), Type:=xlFillDefault
  17.     Range("A9:K13").Select
  18.     Range("A15:A20").Select
  19.     Selection.FormulaR1C1 = "=R[-1]C"
  20.     Selection.AutoFill Destination:=Range("A15:K20"), Type:=xlFillDefault
  21.     Range("A15:K20").Select
  22. End Sub
複製代碼

TOP

        靜思自在 : 每天無所事事,是人生的消費者,積極、有用才是人生的創造者。
返回列表 上一主題