Contact us | 1300 10 28 10
Change colour of cell when entering data

'This macro requires a variable to be set, and will run on every change to the worksheet.

Dim rBefore As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not rBefore Is Nothing Then
        rBefore.Interior.ColorIndex = xlAutomatic
    End If
    Target.Interior.ColorIndex = 3
    Set rBefore = Target
End Sub

 

Our Customers