is it possible to put a '1' in cell based on another cells colour?

I have cell A1 through to A10 that i can click to make green.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("A1:A10"), Target) Is Nothing Then
Target.Interior.ColorIndex = 4
End If
End Sub

based on which cell i turn green ie A1. can I put a 1 in B1, and so on, turn A5 green and B5 gets a 1.

when I un select the colours in row A the number 1's in B disappear.

Regards,
Warren.