|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
大神们,请看!
Sub Macro2()
'
' Macro2 Macro
'
' 快捷键: Ctrl+w
Dim I As Long, t As Long, y As Long
I = 0
t = 2
Do While Range("D" & t).Value <> ""
Windows("综合楼.xls").Activate
Do Until Range("D" & t).Value2 >= 484
Windows("综合楼.xls").Activate
Range("D" & t).Select
Selection.Copy
Windows("mo最新.xls").Activate
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B10").Select
Windows("综合楼.xls").Activate
Range("B" & t).Select
Application.CutCopyMode = False
Selection.Copy
Windows("mo最新.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("综合楼.xls").Activate
Range("F" & t).Select
Application.CutCopyMode = False
Selection.Copy
Windows("mo最新.xls").Activate
Range("B14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H1").Select
Range("H1:H79").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("A" & y + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("MO数据").Select
I = I + 1
t = t + 1
y = I * 80
Loop
Loop
Sheets("sheet1").Select
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Copy
End Sub
知道的请,回个,谢谢!
|
|