The formula =SUM(B2,C2,D2) is used in column E in the following example.
![A formula using explicit cell references like =SUM(B2,C2,D2) can cause a #REF! error if a column is deleted.](https://support.content.office.net/en-us/media/35c9b68f-e2a0-44af-9a4e-aa729a1089ac.png)
A #REF! error would occur if column B, C, or D were deleted. We'll eliminate column C (2007 Sales) in this scenario, and the formula will now be =SUM(B2,#REF!,C2). When you use explicit cell references like this (where each cell is referenced separately, separated by a comma) then delete a referenced row or column, Excel is unable to resolve the reference and returns the #REF! error. This is the main reason why explicit cell references are not recommended in functions.
![Example of the #REF! error caused by deleting a column.](https://support.content.office.net/en-us/media/ad0eac07-3468-41a8-b2c2-b0eb23245bd2.png)
If you mistakenly erased rows or columns, you can restore them by using CTRL+Z or clicking the Undo button on the Quick Access Toolbar.
Make the formula, like =SUM, utilise a range reference instead of individual cells (B2:D2). You can now delete any column inside the sum range and Excel will adjust the calculation automatically. For a sum of rows, you could write =SUM(B2:B5).