VBA & Macro Problems

How to Speed Up Slow Excel VBA Cut and Insert Operations

Jason MillerJason Miller Oct 29, 2026 870 views

Question details

The user is experiencing severe performance issues when running an Excel VBA macro that repeatedly cuts and inserts entire rows within a loop.

How to Speed Up Slow Excel VBA Cut and Insert Operations
Product
Excel VBA
Device & OS
not provided
Scenario
Executing a VBA subroutine that modifies spreadsheet structure by continuously cutting rows and inserting them elsewhere, often called from another parent subroutine.
Observed behavior
The macro runs extremely slowly because Excel is forced to recalculate, redraw, and shift the worksheet layout after every individual cut and insert operation.
Before you start

Save a backup copy of your Excel workbook (.xlsm) before modifying your macro code, as structural VBA changes cannot be undone using the standard Undo button.

Solution 1Recommended

Disable Application Events and Screen Updating

Temporarily turn off Excel's background processes like screen refreshing and automatic calculations while the macro runs to drastically improve execution speed.

Excel's default behavior is to visually redraw the screen and recalculate formulas every time a row is inserted or deleted. By disabling these application-level features at the start of your subroutine and re-enabling them at the end, your macro can perform operations in the background instantly.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor, then locate the module containing your slow subroutine.

2
Turn Off Application Features

At the very top of your macro (right after the 'Sub' declaration), add the following lines: Application.ScreenUpdating = False, Application.EnableEvents = False, and Application.Calculation = xlCalculationManual.

3
Restore Application Settings

At the bottom of your code, just before 'End Sub' or within your error-handling block, restore these settings: Application.ScreenUpdating = True, Application.EnableEvents = True, and Application.Calculation = xlCalculationAutomatic.

Disable Application Events and Screen Updating
Pro Tip: Always use an error-handling section (e.g., 'On Error GoTo ErrorHandler') to ensure these settings are turned back on even if your macro crashes mid-execution.
Free Microsoft Office alternative

Open Large Datasets Faster with WPS Office

If your macro-heavy Excel workbooks are frequently freezing or running slowly, consider handling complex data processing in WPS Office. WPS Spreadsheets is a lightweight, highly optimized alternative that handles massive datasets and intricate formulas with incredible speed while maintaining strict compatibility with Microsoft Excel files.

  1. 1. Download the Installer: Visit the official WPS website and click the download button for your operating system.
  2. 2. Install WPS Office: Run the downloaded executable file and follow the on-screen prompts to complete a quick installation.
  3. 3. Open Your Spreadsheet: Launch WPS Spreadsheets and open your .xlsx or .xlsm file to instantly view your data in a fast, familiar environment.
100% compatibility with Microsoft Excel formats (.xlsx, .xls, .csv)Lightweight architecture for faster software launch and calculation speedsFamiliar user interface requiring zero learning curve to switchFree basic version available for everyday spreadsheet tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why is my VBA macro slow when called from another subroutine, but fast on its own?

When you use the 'CALL' statement from a parent subroutine, the parent routine might have Application Events, ScreenUpdating, or Automatic Calculations enabled. It may also hold onto system resources. To fix this, ensure your top-level subroutine toggles these Application settings off before making the 'CALL'.

What is the fastest way to delete multiple rows in Excel VBA?

The fastest method is to use the Union function to group all rows you want to delete into a single Range object while looping, and then delete the entire Union range in one single command at the end of the loop, bypassing the need to delete rows iteratively.

Does disabling EnableEvents in VBA affect my formulas?

No, Application.EnableEvents = False only prevents Excel from triggering event macros (like Worksheet_Change). It is Application.Calculation = xlCalculationManual that stops formulas from recalculating. Both are safe to disable temporarily as long as you re-enable them at the end of your script.