Using the Cancel Selection Shortcut
Windows keyboard shortcut
Mac keyboard shortcut
This Excel shortcut aborts the operation when editing a cell and leaves the cell in its original state.
Other useful Selection keyboard shortcuts