有谁知道如何移动 Excel 中的页面以基本上将电子表格分成两半?
例如,我的电子表格中有 390,000 行。
如果您使用 12 号字体以纵向格式打印电子表格,则每页大约有 44 行,接近 8800 页。
我想把它减半。
我有 3 列。我想做的就是将偶数页移至奇数页,那里有足够的空间。谁能告诉我我能做什么?

尝试这个宏(最好在保存文件后)。
Sub adsagrse()
Dim lRows As Long
'turn off updates to speed up code execution
With application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
.DisplayAlerts = False
End With
lRows = 45
Do While Len(Cells(lRows, 1)) > 0
Cells(lRows, 1).Resize(44, 3).Copy Cells(lRows, 1).Offset(-44, 4)
Cells(lRows, 1).Resize(44, 3).ClearContents
lRows = lRows + 88
llop
ActiveSheet.UsedRange.AutoFilter
ActiveSheet.UsedRange.AutoFilter 1, ""
ActiveSheet.UsedRange.Offset(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
ActiveSheet.UsedRange.AutoFilter
With application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
.DisplayAlerts = True
End With
End Sub
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21440 次 |
| 最近记录: |