Private Sub Worksheet_Change(ByVal Target As Range)
[COLOR="Magenta"] If Target.[I][U]Column[/U][/I] = [B][I]1[/I][/B] Then[/COLOR]
If Cells(Target.Row, 1) - Int(Cells(Target.Row, 1)) = 0 Then
Cells(Target.Row, 1).NumberFormat = "#,##0"
Else: Cells(Target.Row, 1).NumberFormat = "#,##0.00"
End If
[COLOR="Magenta"] End If[/COLOR]
End Sub