|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub Macro2()
-
- On Error Resume Next
- Sheets("第一 (2)").Activate
- If Err.Number = 0 Then
- Sheets("第一").Activate
- Range("A1").CurrentRegion.Select
- Selection.Clear
- Sheets("第一 (2)").Activate
- Range("A1").CurrentRegion.Select
- Selection.Copy
- Sheets("第一").Activate
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- End If
- Err.Clear
- Sheets("第二 (2)").Activate
- If Err.Number = 0 Then
- Err.Clear
- Sheets("第二").Activate
- Range("A1").CurrentRegion.Select
- Selection.Clear
- Sheets("第二 (2)").Activate
- Range("A1").CurrentRegion.Select
- Selection.Copy
- Sheets("第二").Activate
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- End If
- Err.Clear
- Sheets("第三 (2)").Activate
- If Err.Number = 0 Then
- Err.Clear
- Sheets("第三").Activate
- Range("A1").CurrentRegion.Select
- Selection.Clear
- Sheets("第三 (2)").Activate
- Range("A1").CurrentRegion.Select
- Selection.Copy
- Sheets("第三").Activate
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
- End If
- Err.Clear
- End Sub
复制代码 |
|