老师们,我已经写了从第2个Sheet第5个Sheet各自的储存格A3到G3汇集到Sheet"Chart"内,但要怎样写才能自动loop把第2个Sheet第5个Sheet各自的储存格A4到G4也汇集到Sheet"Chart",然后是储存格A5到G5一直重複下去呢?
Sub 宏6() '1 Sheets("二分之一层").Select '2 Range("A3").Select '3 Range(Selection, Selection.End(xlToRight)).Select '4 Selection.Copy '5 Sheets("Chart").Select '6 Range("C3").Select '7 ActiveSheet.Paste '8 ActiveCell.Offset(1, 0).Select '9 Sheets("四分之一层").Select '10 Range("A3").Select '11 Range(Selection, Selection.End(xlToRight)).Select '12 Selection.Copy '13 Sheets("Chart").Select '14 ActiveSheet.Paste '15 ActiveCell.Offset(1, 0).Select '16 Sheets("八分之一层").Select '17 Range("A3").Select '18 Range(Selection, Selection.End(xlToRight)).Select '19 Selection.Copy '20 Sheets("Chart").Select '21 ActiveSheet.Paste '22 ActiveCell.Offset(1, 0).Select '23 Sheets("88层").Select '24 Range("A3").Select '25 Range(Selection, Selection.End(xlToRight)).Select '26 Selection.Copy '27 Sheets("Chart").Select '28 ActiveSheet.Paste '29 ActiveCell.Offset(1, 0).Select
End Sub
|