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 Alt + = (Alt+Equal sign), and confirm that the correct cells were selected as part of the sum or adjust them manually.