I created a bug in a user-defined function that is called from a large number of cells on many tables in an Excel workbook (not the way I would design it, I just "inherited" it).

But now, I can't seem to get rid of the #VALUE errors in the cells referencing this VBA function.

Tried so far:

  • Calculation menu, "Calculate Sheet"
  • Saving, re-opening (this workbook is set to calculate before saving)
  • Setting the calculation mode to Manual and back again to Automatic
  • ActiveSheet.Calculate
  • Application.Calculate
  • Application.CalculateFull

The only thing that seems to work is editing each cell and just hitting Enter to reset each formula, or overwriting the formulas via copy/paste.


I figured it out as I was typing the question:


There must be a better solution but you can simulate editing the cell by doing a replace of = with = across the whole tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.