Another way in the attached.
Will work on the columns headed L, M & H, even if they are not next to each other.
Only selecting a cell will not add a tick
When revisiting a row to uncheck a box, it will not need to be clicked twice.
Downsides:
Can be tricked by setting a group of cells to
true in one go (it only handles single cell changes).
Will fall over if any of the columns L, M & H are missing.
I'm guessing that you may have more than one sheet that you need this to work on?
If so, instead of having this code in each sheet, similar code could be in the
ThisWorkbook code-module. Come back if that's the case.
The code in the attached workbook:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 Then
On Error Resume Next
Set tbl = Target.ListObject
On Error GoTo 0
If Not tbl Is Nothing Then
With tbl
Set rngCBoxColms = Union(.ListColumns("L").DataBodyRange, .ListColumns("M").DataBodyRange, .ListColumns("H").DataBodyRange)
If Not Intersect(rngCBoxColms, Target) Is Nothing Then
Set rngLMH = Intersect(Target.EntireRow, rngCBoxColms)
If Target Then 'only operates if a tick is being added to the checkbox (ie. from false to true)
For Each cll In rngLMH.Cells
If cll.Address <> Target.Address Then cll.Value = False
Next cll
End If
End If
End With
End If
End If
End Sub