ateneva
4/16/2017 - 1:52 PM

Colour cells that have absolute value greater than 1.96

Colour cells that have absolute value greater than 1.96

Sub ColourCellsonAbsoluteValues()
Dim Cell As Range
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'written by Angelina Teneva, September 2016
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For Each Cell In Selection
    Cell.Activate
    
    If Cell.Value < 0 Then
        Cell.Font.Color = RGB(255, 0, 0) 'Makes negative cells red
        Else
        Cell.Font.Color = xlNone
    End If
    
    If Abs(Cell.Value) > 1.96 Then Cell.Interior.Color = RGB(0, 255, 204)

Next Cell
End Sub