Last reviewed: 01/8-2024.
Start by trying to press “undo” (ctrl+z on windows or cmd+z on apple) or shut down the workbook without pressing save.
If none of the above work, or if you pressed save after deleting the sum formula, you can simply recreate the sum formula by selecting the field where the sum will be placed, press ctrl+shift+0 (Control+Shift+Zero), and select the fields that should be a part of the sum formula.