|
Sub cyj()
Dim Arr1, Hy, Y
With Sheet1
Arr1 = .Range("a2").CurrentRegion
Y = 2
For Hy = 1 To UBound(Arr1)
.Range(.Cells(Hy, 4), .Cells(Hy, 12)).Copy Sheet2.Cells(Y, 1)
Y = Y + 1
Next
End With
End Sub
如何修改以上代码使其复制时不带格式,谢谢!
Sub cyj()
Dim Arr1, Hy, Y
With Sheet1
Arr1 = .Range("a2").CurrentRegion
Y = 2
For Hy = 1 To UBound(Arr1)
.Range(.Cells(Hy, 4), .Cells(Hy, 12)).Copy
Sheet2.Cells(Y, 1).pastespecial paste:=xlpastevalues
Y = Y + 1
Next
End With
End Sub
|
|