Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = "h" Then
Target.Interior.Color = vbGreen
ElseIf Target.Value = "s" Then
Target.Interior.Color = vbRed
ElseIf Target.Value = "v" Then
Target.Interior.Color = vbBlue
End If
I've got my coding working for individual cells but fails when multiple cells are selected. What can be done to fix this.
So, for example I select range A5:A9 and type h all cells of this range should have an h and blue.
Thanks
Try again, maybe expanded on above.
you have blank worksheet. You select one cell say A1 move cursor over 4 cells A5 which now gives you a range of A1:A5 highlighted (selected). You type h in (which is the A1) of this still selected range.
Now here is what I wish to happen A2 thru A5 will fill with h and back color blue or whatever in case statements Joe laid out.
Note: The select cell or cells will behave as above and the select cell will not have letter in it, user is putting this.
I believe this is a better explanation I hope?