Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Cells.FormatConditions.Delete

    Call 조건부서식(ActiveCell.EntireColumn)
    Call 조건부서식(ActiveCell.EntireRow)
        
    ActiveCell.FormatConditions.Delete

End Sub

Sub 조건부서식(ref As Range)

    With ref
        
        .FormatConditions.Add Type:=xlExpression, Formula1:="=TRUE"
        
        With .FormatConditions(.FormatConditions.Count).Interior
        
            .PatternColorIndex = xlAutomatic
            .ThemeColor = xlThemeColorDark1
            .TintAndShade = -0.05
        
        End With
        
    End With

End Sub