Forum Discussion

STAspeedyssey's avatar
STAspeedyssey
Copper Contributor
Mar 23, 2024

Conditional Formating with formular based on check box form control

My column G has check box form control. I need to set conditional formatting for column D so that when the check box is marked checked, the column D is formatted 

3 Replies

  • STAspeedyssey 

    Set the Cell link for each check box to the cell it covers:

    If you wish, you can hide the TRUE/FALSE value in the cell by setting the number format of the cells with the check boxes to the custom format ;;; (three consecutive semicolons).

    You can then use the formula =$G2 in your conditional formatting rule for column D (assuming that G2 is the top cell with a check box).

    • STAspeedyssey's avatar
      STAspeedyssey
      Copper Contributor
      Thanks.
      If we have over a hundrend rows, is there a way to auto replicate the formula across rows
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        STAspeedyssey 

        Run this macro:

        Sub AssignCellLinks()
            Dim chk As CheckBox
            For Each chk In ActiveSheet.CheckBoxes
                chk.LinkedCell = chk.TopLeftCell.Address
            Next chk
        End Sub

Resources