.
Paste this in the Sheet Module :

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
Dim lr As Long

    lr = Cells(Rows.Count, 1).End(xlUp).Row

    For Each cell In Range("A1:A" & lr)

        Select Case cell.Value

        Case Is = 5
            cell.HorizontalAlignment = xlRight

        Case Else
            cell.HorizontalAlignment = xlCenter

        End Select

    Next cell

End Sub