logo
search
VBA & Macro Problems

How to Move an Excel Row to Another Tab When a Checkbox Is Selected

John WilsonJohn Wilson Sep 25, 2026 870 views

Question details

The user is looking for a way to transfer an entire data row to a different worksheet tab triggered by checking a checkbox.

How to Move a Row to Another Tab upon Checkbox Selection in Excel
Product
Excel / WPS Spreadsheet
Device & OS
not provided
Scenario
Managing tasks, inventory, or data lists across multiple sheets where checking a box (e.g., marking a task as 'Done') should move the record to an archive or completed tab.
Observed behavior
A reliable method to identify the correct checkbox type (Form Control vs. ActiveX) and trigger an automated row transfer (via VBA, Scripts, or manual workaround) to a designated worksheet tab.
Before you start

Before proceeding, determine if you are using Form Control checkboxes or ActiveX checkboxes, as the automation approach differs for each. Ensure your workbook is saved as a Macro-Enabled Workbook (.xlsm) if you plan to use VBA.

Solution 1Recommended

Automate Row Movement Using a VBA Macro

Use a VBA script assigned to a Form Control checkbox to automatically cut the row and paste it into the destination sheet when checked.

This solution relies on the Developer tab being enabled. It uses a Form Control checkbox assigned to a macro that identifies the row of the clicked checkbox and moves it to the next available blank row in the destination tab.

1
Insert a Form Control Checkbox

Navigate to the Developer tab on the ribbon. Click 'Insert' and select the 'Check Box' under Form Controls. Click on the cell where you want the checkbox to appear.

2
Open the VBA Editor

Press Alt + F11 to open the Visual Basic for Applications editor. Go to Insert > Module to create a new module space for your script.

3
Write the VBA Code

Paste a VBA script that defines variables for the source and destination worksheets. Use Application.Caller to identify which checkbox was clicked, find its parent row, copy/cut the row, and paste it to the last empty row of the target tab.

4
Assign the Macro to the Checkbox

Return to your worksheet, right-click the checkbox, and choose 'Assign Macro'. Select the macro you just created from the list and click 'OK'.

Automate Row Movement Using a VBA Macro
Macro Security: You may need to adjust your Trust Center settings to allow macros to run. Always ensure you only run macros from trusted sources.
Advanced Spreadsheet Automation

Automate Spreadsheets with WPS Office Macros

WPS Spreadsheet provides powerful macro support (VBA compatible) allowing you to seamlessly automate tasks like moving rows when a checkbox is clicked, just as you would in Microsoft Excel.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook. Navigate to the Developer tab to access macro and control tools.
  2. 2. Insert Form Controls: Click 'Insert' within the Developer tab to add a Check Box to your target row quickly.
  3. 3. Write and Assign Macros: Click 'Macros' or press Alt+F11 to open the WPS VBA Editor. Paste your row-moving script and assign it to the newly created checkbox.
Fully compatible with Microsoft Excel .xlsm and .xlsx formatsBuilt-in Macro and VBA editor for automating complex workflowsLightweight application that runs smoothly on most devicesIntuitive interface for inserting Form Controls and ActiveX components
microsoft office alternative - wps office

Frequently Asked Questions

Can I move a row automatically using only Excel formulas?

No. Excel formulas can only calculate and display values in the cell where they are written; they cannot perform actions such as moving, cutting, or deleting rows. To automate row movement, you must use VBA, Office Scripts, or Power Automate.

Why isn't my VBA macro moving the row when I click the checkbox?

Ensure the checkbox is properly linked by right-clicking it and checking 'Assign Macro'. Verify that your VBA code correctly references the exact names of your source and destination worksheet tabs, and that macros are enabled in your Trust Center settings.

How do I link a checkbox to a cell value?

Right-click the Form Control checkbox, select 'Format Control', and navigate to the 'Control' tab. Click in the 'Cell link' field, select the desired cell, and click OK. The selected cell will now display TRUE when the box is checked and FALSE when unchecked.

What is the difference between Form Control and ActiveX checkboxes?

Form Control checkboxes are simpler, easier to insert, and work well for basic macro assignments (Assign Macro). ActiveX checkboxes allow for more complex formatting and are programmed using their own specific click events directly inside the worksheet's code module.