Dùng VBA để đổi, còn giá trị bạn nhập sao thì nó như vậy:
Chế lại từ cái này:
'==========
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rngInput As Range
Set rngInput = Range("B3
30") 'Vung nhap du lieu tu dong doi so
On Error GoTo EndMacro
If Application.Intersect(Target, rngInput) Is Nothing Then
Exit Sub
End If
If Target.Cells.Count > 1 Then
Exit Sub
End If
If Target.Value = "" Then
Exit Sub
End If
Application.EnableEvents = False
With Target
If .HasFormula = False Then
If IsNumeric(.Value) And Len(.Value) > 0 Then
.Value = .Value * 1000
Else
Err.Raise 0
End If
End If
End With
Application.EnableEvents = True
Exit Sub
EndMacro:
MsgBox "You did not enter a valid value"
Application.EnableEvents = True
End Sub
'==========