答:确保Sheet1为活动工作表时,运行下面代码。
Sub Demo() Dim MyRng As Range Dim DesRng As Range Set MyRng = Range("B6:G10") Set DesRng = Sheets("Sheet2").Cells(Rows.Count, 4).End(xlUp).Offset(1, 0) MyRng.Copy With DesRng .PasteSpecial xlPasteValues .Offset(0, -3).Resize(MyRng.Rows.Count, 1) = Range("F1") .Offset(0, -2).Resize(MyRng.Rows.Count, 1) = Range("B1") .Offset(0, -1).Resize(MyRng.Rows.Count, 1) = Range("B2") End With Application.CutCopyMode = FalseEnd Sub