|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 复制数据()
Application.ScreenUpdating = False
On Error Resume Next
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Dim WW As Long, XX As Long, YY As Long, ZZ As Long
WW = Cells.Find("*", , , , 1, 2).Row
YY = Cells.Find("*", , , , 2, 2).Column
For XX = 1 To WW
For ZZ = 2 To YY
If Cells(XX, ZZ) <> "" Then Cells(XX, 1) = Cells(XX, ZZ)
Next
Next
Application.EnableEvents = True
Application.DisplayAlerts = True
Application.Calculation = xlCalculationAutomatic
On Error GoTo 0
Application.ScreenUpdating = True
End Sub
|
|