Excel Checkbox – How to Insert, Format & Remove

This is an overview.


Download Practice Workbook

Download the practice workbook.


How to Add a Checkbox in Excel.

  • Go to the Developer tab and click Insert.
  • Select Check Box in Form Controls.

adding a checkbox


How to Add Check Boxes without the Developer Tab in Excel

  • Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  • Go to the Insert tab and select Module.
  • Enter the code in the Module:
Sub Add_Checkbox()
Dim x As Range
Dim y As checkbox
Dim yRange As Range
On Error Resume Next
Set yRange = Application.InputBox(Prompt:="Select range", Type:=8)
If Err.Number <> 0 Then Exit Sub
On Error GoTo 0
For Each x In yRange
Set y = yRange.Parent.CheckBoxes.Add(0, 1, 1, 0)
With y
.Top = x.Top + x.Height / 2 - y.Height / 2
.Left = x.Left + x.Width / 2 - y.Width / 2
.Locked = False
.Caption = ""
.Name = x.Address
End With
Next x
End Sub
  • Press Ctrl + S to save the code.
  • Press Alt + F8 to open the Macro window.
  • Run the code by selecting it from the Macro window.

select macro name

  • In the input box, select the range to add the checkboxes.

select input range

  • This is the output.

adding a checkbox without developer tab


How to Format a Checkbox in Excel

Resizing a Checkbox

  • Right-click the checkbox and select Format Control.
  • Select Size and Rotate In Size.
  • Enter values in height and width.

resize checkbox in Excel

Renaming a Checkbox

  • Right-click and choose Edit Text: enter new text.

rename checkbox in Excel

Fixing the Position of a Checkbox

  • Right-click the checkbox, go to Format Control, and select Properties.
  • Select Don’t move or size with cells in object’s positioning.
  • The checkbox will remain fixed.

fixing the position of check box

Hide or Unhide a Checkbox

  • Access the selection pane pressing Alt + F10.
  • Click the icon to hide the checkbox.
  • Click it again to unhide it.

hide or unhide checkbox


How to Link a Checkbox to a Cell in Excel

  • Right-click the checkbox and choose Format Control.
  • Enter or select a cell ($D$5) to link to the checkbox in Cell Link.
  • The default value of Checked is TRUE, and Unchecked is FALSE.
  • Click OK.

link a checkbox to a cell

  • D5 cell is connected to the C5 checkbox. If you check the box, TRUE will be displayed in D5.

linked the cell


How to Use Conditional Formatting with Checkboxes in Excel

  • Select a cell and go to the Home tab as shown below.
  • In Conditional Formatting, click New Rule.

use conditional formatting

  • Enter the cell reference and choose Use a formula to determine which cells to format.
  • Click Format.

select the cells

  • Check Strikethrough in Font.
  • Click OK.

select the effects

  • Accept the preview by clicking OK.
  • The value in B5 is highlighted when the checkbox in C5 is selected.
  • Follow the above steps for the other checkboxes.

use conditional formatting in checkboxes


Using Checkboxes in Excel – Examples

1. How to Create an Interactive Checklist in Excel

Use the Conditional Formatting tool.

create interactive checklist


2. Add a Checkbox to Create an Interactive Checklist with Summary

Use checkboxes to create an interactive checklist with a summary.

interactive checklist with summary


How to Print a Checkbox in Excel

  • Right-click the checkbox, choose Format Control, and go to Properties.
  • Check Print Object.

print checkbox


How to Delete a Checkbox in Excel

  • Go to the Home Tab and click Editing.
  • Choose Find & Select and select Selection Pane.
  • Inside the selection pane, you will find a list of all checkboxes used in your worksheet. Select them individually or select multiple checkboxes by holding the control key.
  • Press delete.

delete checkbox


Things to Remember

  • Drag the Fill Handle down to add the checkboxes. Double-clicking the Fill Handle will not work.
  • If you are working with VBA code, save the file as an Excel Macro-Enabled Workbook.

Frequently Asked Questions

1. How can I count the number of checked or unchecked checkboxes in Excel?

To count the number of checked or unchecked checkboxes, use the COUNTIF or the SUMPRODUCT  formulas and the cell range containing the linked checkbox values. To count the number of checked checkboxes, use the formula: =COUNTIF(A1:A10, TRUE), assuming the checkboxes are linked to A1:A10.

2. Can I customize the appearance of a checkbox in Excel?

Yes. Right-click the checkbox and select Format Control. Modify size, color or font.


Excel Checkbox: Knowledge Hub


<< Go Back to Form Control in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Saquib Ahmad Shuvo
Saquib Ahmad Shuvo

Saquib Ahmad Bhuiyan, holding a BSc degree in Naval Architecture & Marine Engineering from Bangladesh University of Engineering and Technology, skillfully integrates engineering expertise with a passion for Excel. He provides solutions to complex issues as an Excel & VBA Content Developer for ExcelDemy Forum. He demonstrates an enthusiastic mindset and adeptness in managing critical situations with finesse, showcasing his commitment to excellence. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, Rhinoceros,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo