
Sub prova()
Dim coltxt As Long
Dim colsfn As Long
coltxt = Range("a1").Font.ColorIndex
colsfn = Range("a1").Interior.ColorIndex
ActiveCell.Font.ColorIndex = coltxt
ActiveCell.Interior.ColorIndex = colsfn
End Sub
|
Private Sub Worksheet_Change(ByVal Target As Range)
Dim coltxt As Long
Dim colsfn As Long
If Not Intersect(Target, Range("B:B")) Is Nothing Then
coltxt = Target.Offset(0, -1).Font.ColorIndex
colsfn = Target.Offset(0, -1).Interior.ColorIndex
Target.Font.ColorIndex = coltxt
Target.Interior.ColorIndex = colsfn
End If
End Sub
|
