VBA实现关闭Excel自动计算,关闭屏幕刷新

Excel代码提速神器

涉及到提取表格大量数据操作,复制粘贴多个单元格时,尽量避免一个个单元格提取,或者一行行一列列提取数值,设计大量IO流操作非常浪费时间。尽量找出数据之间的规律,批量选中复制粘贴,找到利用双指针或者其他算法找到连续行或者列的规律进行批量操作。往往能几十倍的提升代码运行效率,一下

批量复制行列

连续行列复制

Range("A1:B3")

间隔行列复制

选中多行

粘贴后

选中区域顺序按照原先顺序

Dim MyArea1, MyArea2, MyArea3 As Range

Set MyArea1 = Range("A1:B3")

Set MyArea2 = Range("A7:B10")

Set MyArea3 = Range("A12:B14")

Application.Union(MyArea1, MyArea2, MyArea3).Select

转置粘贴

粘贴->选择粘贴->转置

c 复制代码
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True

关闭屏幕刷新

Application.ScreenUpdating = False

Application.ScreenUpdating = True

关闭公式自动计算

Application.Calculation = xlManual

Application.Calculation = xlCalculationAutomatic

相关推荐
wtsolutions19 小时前
JSON to Excel Add-in - Seamless Integration Within Excel
json·excel
wtsolutions19 小时前
Getting Started with JSON to Excel Web App - Convert in Seconds
json·excel·web app
wtsolutions1 天前
Using the JSON to Excel API - Programmatic Access for Developers
json·excel
qq_435139571 天前
EasyExcel(FastExcel)Excel导出功能 技术文档
excel
wtsolutions1 天前
Understanding JSON Formats - What JSON to Excel Supports
json·excel
wtsolutions1 天前
Advanced Features - Unlocking the Power of JSON to Excel Pro
linux·json·excel
fs哆哆1 天前
VB.NET和VBA教程-如何查找Excel数据区域边界
excel
小矮强1 天前
Excel中根据年月日提取月日,并按月日进行排序
excel
开开心心_Every1 天前
图片批量压缩工具:支持有损无损两种模式
python·游戏·微信·django·pdf·excel·语音识别
wtsolutions1 天前
Real-World Use Cases - How Organizations Use JSON to Excel
json·excel