Escel - how to reverse "Replace formulas with their calculated values"

Copper Contributor

Hi,

 

I have inherited a large customised workbook and need to make some changes to repair an error that I have found.

In one of the sheets there is a cell with a value. This value changes based on a selection in another sheet, but the cell in question contains no formula. It just has a value. There is also no VBA code present to push a value to the cell.

 

The only thing that I can think of is that the cell has at some time had the formula replaced with its calculated value.

 

Is there a way to reverse this to recover the original formula? The formula must still exist in the workbook otherwise the cell would not update?

 

Thanks in advance.

2 Replies
I believe you have to recreate the formula yourself.

Thanks for the info @Twifoo, I was afraid of that.

 

However, the problem is that there are approximately 15 worksheets and I have no idea what data the original formula is referencing without seeing the formula. It includes complicated electrical calculations across several worksheets to produce a result. The result of the formula is now creating an error under some (new) scenarios and I need to review the formula to thereby correct the original data-sets that the formula is working through.

 

As you can imagine it is not possible to reverse-engineer the formula. Tracing precedents offers nil results, and tracing dependants of course shows everything that subsequently uses the result for further calculations.

 

Just recreating the formula myself is not in this case remotely possible.

 

If there was a formula that has been replaced with the result, that formula must still exist somewhere in the workbook, or the result would not calculate.

 

Perhaps someone out there knows a VB script that could help extract the replaced formula?

 

Nick.