Sub GetValue2() UserEntry = InputBox("Enter the value") If UserEntry <> "" Then range("A1").value = UserEntry End Sub