I want this code to work from row 1 not 11 and also to happen as soon as text is pasted in cell A1...any ideas ?
Private Sub Worksheet_selectionChange(ByVal Target As Excel.Range)
Dim LR As Long, i As Long
If Target.Address(False, False) = "A1" Then
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("A1" & i)
If .Font.Bold = True Then
.Resize(, 2).Interior.ColorIndex = 15
.Resize(, 2).Font.ColorIndex = 0
Else
.Resize(, 2).Interior.ColorIndex = xlNone
.Resize(, 2).Font.ColorIndex = 0
End If
End With
Next i
End If
End Sub
Many thanks
Private Sub Worksheet_selectionChange(ByVal Target As Excel.Range)
Dim LR As Long, i As Long
If Target.Address(False, False) = "A1" Then
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("A1" & i)
If .Font.Bold = True Then
.Resize(, 2).Interior.ColorIndex = 15
.Resize(, 2).Font.ColorIndex = 0
Else
.Resize(, 2).Interior.ColorIndex = xlNone
.Resize(, 2).Font.ColorIndex = 0
End If
End With
Next i
End If
End Sub
Many thanks