In Excel, the standard form control or ActiveX control checkboxes can only display a checkmark when checked. There isn't a built-in option to change the checkbox symbol to a cross (✘) directly through Excel's default checkbox controls. However, you can achieve this effect using a combination of shapes, conditional formatting, and a bit of VBA (Visual Basic for Applications). Here are two methods to create a checkbox that displays a cross when checked.
Method 1: Using Shapes and VBA
-
Insert a Rectangle Shape:
- Go to the Insert tab.
- Click on Shapes and choose a Rectangle.
- Draw the rectangle where you want the checkbox to be.
-
Assign a Macro to the Shape:
-
Right-click the rectangle and choose Assign Macro.
-
Click New to create a new macro.
-
In the VBA editor, enter the following code:
Sub ToggleCheckbox()
Dim shp As Shape
Set shp = ActiveSheet.Shapes(Application.Caller)
If shp.TextFrame.Characters.Text = "" Then
shp.TextFrame.Characters.Text = "✘"
shp.Fill.ForeColor.RGB = RGB(255, 0, 0) ' Optional: Change fill colour when checked
Else
shp.TextFrame.Characters.Text = ""
shp.Fill.ForeColor.RGB = RGB(255, 255, 255) ' Optional: Change fill colour when unchecked
End If
End Sub
-
Save and close the VBA editor.
-
Assign the ToggleCheckbox macro to the rectangle.
-
Format the Shape:
- You can format the rectangle to look like a checkbox by adjusting the fill colour, border, and other properties as needed
Now, when you click the rectangle, it will toggle between an empty state and displaying a cross (✘).
Method 2: Using a Checkbox and a Linked Cell with Conditional Formatting
-
Insert a Checkbox:
- Go to the Developer tab. (If the Developer tab is not visible, you need to enable it in Excel Options.)
- Click Insert in the Controls group.
- Under Form Controls, select the Checkbox and draw it on the sheet.
-
Link the Checkbox to a Cell:
- Right-click the checkbox and choose Format Control.
- In the Control tab, set Cell link to a cell, e.g.,
A1. This cell will hold TRUE when the checkbox is checked and FALSE when it is unchecked
-
Insert a Text Box:
- Go to the Insert tab.
- Click on Text Box and draw it near the checkbox.
-
Link the Text Box to the Cell
- Click into the text box and type
=IF(A1=TRUE,"✘","") This will display a cross when the checkbox is checked and nothing when it is unchecked.
-
Format the Text Box:
- Remove the border of the text box to make it look like part of the checkbox.
- Adjust the font size and colour as needed
Now, when you check the checkbox the linked cell will turn TRUE and the text box will display a cross (✘). When unchecked the cell will be FALSE and the text box will be empty.
Choosing a Method
- Method 1 is more streamlined and uses a single shape, but requires VBA knowledge.
- Method 2 does not require VBA and uses native Excel features, but involves multiple elements.
Choose the method that best fits your comfort level and requirements.