Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$O$7" And Right(Target.Value, 2) = " " Then Target.Value = Trim("#" & Target.Value)
If Target.Address = "$O$8" And Right(Target.Value, 1) = " " Then Target.Value = Trim(Target.Value) & "m"
End Sub