Hi again,
See if the following code does what you need:
Public Sub ToggleCell()
Const sTARGET_RANGE As String = "E10:F20"
Const lDARK_BLUE As Long = &HFF0000
Const lBLACK As Long = 0
Dim rCell As Range
For Each rCell In Selection.Cells
With rCell
If Not Intersect(rCell, _
ActiveSheet.Range(sTARGET_RANGE)) Is Nothing Then
If .Font.Bold = True Then
.Font.Bold = False
.Font.Color = lBLACK
Else: .Font.Bold = True
.Font.Color = lDARK_BLUE
End If
End If
End With
Next rCell
End Sub
Select one or more cells and then run the macro to toggle the appearance of the cells.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks