回覆列表
  • 1 # 使用者1465424935672

    Sub Macro1()

    Dim i As Integer

    Dim CT As Integer

    Dim TargetLocation As Integer

    Dim SourceLocation As Integer

    SourceLocation = 2

    TargetLocation = 2

    Sheets("sheet1").Select

    Range("C" & SourceLocation).Select

    CT = ActiveCell.Value

    Do

    Range("A" & SourceLocation & ":C" & SourceLocation).Select

    Selection.Copy

    For i = 1 To CT

    Sheets("Sheet2").Select

    Range("A" & TargetLocation).Select

    ActiveSheet.Paste

    TargetLocation = TargetLocation + 1

    Next i

    SourceLocation = SourceLocation + 1

    Sheets("sheet1").Select

    Range("C" & SourceLocation).Select

    CT = ActiveCell.Value

    Loop While CT > 0

    End Sub

  • 中秋節和大豐收的關聯?
  • 牙疼怎麼辦?