To avoid receiving a #REF! error value when you drag or paste cells on
top of referenced cells, or delete referenced cells, use the INDIRECT()
function or the OFFSET() function to reference the cell indirectly. For
example, to reference cell A1 in Sheet1, use one of the following formulas
in cell A2 of Sheet1:
=INDIRECT("Worksheet1!A1")
-or-
=OFFSET(worksheet1.xls!A2,-1,0)
NOTE: Neither of these two functions, if used to reference cell A1, returns the #REF! error; however, neither one updates the cell reference within the formula. So, in this example, if you cut cell A1 and paste it into another worksheet, cell A2 still references cell A1 and displays a value of 0.