VBA & Macro Problems

Fix Copied Excel Checkboxes That Link to Original Cells

Camila MilosovichCamila Milosovich Nov 13, 2026 869 views

Question details

Update copied Excel checkboxes so each one links to its intended cell.

Fix Copied Excel Checkboxes That Link to Original Cells
Product
Microsoft Excel
Device & OS
not provided
Scenario
Form-control checkboxes are copied across a worksheet, with corresponding linked cells elsewhere in the sheet.
Observed behavior
Copied checkboxes continue to reference the original linked cells instead of updating their links automatically.
Before you start

Confirm that the checkboxes are Form Controls by right-clicking one and checking for Format Control. Identify the checkbox range and the intended linked cells; the VBA example below assumes each linked cell is 24 rows below its checkbox.

Solution 1Recommended

Assign Checkbox Cell Links with VBA

Use a macro to update many form-control checkboxes whose linked cells follow a consistent offset.

The example links each checkbox anchored in D7:G23 to the cell 24 rows below it, so a checkbox at E11 links to E35. Change the range if your checkboxes extend into more columns.

1
Open the VBA editor

In desktop Excel, open the worksheet containing the checkboxes, then select Developer > Visual Basic. If the Developer tab is hidden, enable it in Excel's ribbon settings.

2
Insert the macro

In the VBA editor, select Insert > Module and paste this code: Sub LinkFormCheckboxes() Dim ws As Worksheet Dim shp As Shape Dim checkboxRange As Range Set ws = ActiveSheet Set checkboxRange = ws.Range("D7:G23") For Each shp In ws.Shapes If shp.Type = msoFormControl Then If shp.FormControlType = xlCheckBox Then If Not Intersect(shp.TopLeftCell, checkboxRange) Is Nothing Then shp.ControlFormat.LinkedCell = ws.Cells(shp.TopLeftCell.Row + 24, shp.TopLeftCell.Column).Address End If End If End If Next shp End Sub

3
Adjust and run the macro

Edit D7:G23 and the number 24 in the code if your layout differs. Return to the checkbox worksheet, select Developer > Macros, choose LinkFormCheckboxes, and select Run.

4
Check the links

Right-click a checkbox and select Format Control > Control. Confirm that Cell link points to the intended cell, then click the checkbox and check that the linked cell changes.

5
Save the macro

To keep the VBA code, select File > Save As and choose Excel Macro-Enabled Workbook (.xlsm).

Assign Checkbox Cell Links with VBA
Check the range before running: The macro replaces existing links for all Form Control checkboxes whose top-left corners are in the specified range. It does not update ActiveX or in-cell checkboxes. Make sure the target cells are intended for checkbox values.
Free Microsoft Office alternative

Work with Excel-Compatible Spreadsheets in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar spreadsheet interface and Excel format compatibility for a smoother move between applications. Excel-specific checkbox and VBA behavior may differ, so test your workbook before relying on those features in WPS.

Open and edit Microsoft Excel XLSX spreadsheetsUse a familiar spreadsheet interface to work with cell ranges and formulasMove existing Office files into a lightweight productivity suiteUse core spreadsheet features for free
microsoft office alternative - wps office

Frequently Asked Questions

Why do copied checkboxes update the same cell?

Copied Form Control checkboxes can retain the original Cell link. Right-click each checkbox and select Format Control > Control to inspect or change its link.

How can I link a checkbox at E11 to E35?

Right-click the checkbox, select Format Control > Control, enter E35 in Cell link, and select OK. The VBA example can also assign this link because E35 is 24 rows below E11.

Can I update all checkbox links without VBA?

You can change each Form Control checkbox individually through Format Control > Control > Cell link. For many checkboxes with a regular layout, the VBA method is faster.

Does the macro work with ActiveX checkboxes?

No. The example targets Form Control checkboxes only. Check the control type before running it and use a different approach for ActiveX controls.

Why does the linked cell show TRUE or FALSE?

A linked cell records the checkbox state: TRUE when checked and FALSE when unchecked. Select the cell after clicking the checkbox to verify that it changes.