Sub CreateCheckboxesWithCellReferences()
Dim ws As Worksheet
Dim rng As Range
Dim cb As CheckBox
Dim cell As Range
' VBA Code By Excelmind
' Set the worksheet where you want to add checkboxes
Set ws = ThisWorkbook.Sheets("Sheet1")
' Select the range where you want to add checkboxes
Set rng = Application.InputBox("Select a range", Type:=8)
' Loop through each cell in the selected range
For Each cell In rng
' Create a checkbox in each cell
Set cb = ws.CheckBoxes.Add(cell.Left, cell.Top, cell.Width, cell.Height)
' Set the linked cell for the checkbox
cb.LinkedCell = cell.Address
' Adjust the checkbox appearance
cb.Caption = ""
cb.Value = xlOff
Next cell
End Sub