excel - Auto recalculate special case, how to - Stack Overflow

I have a workbook with a worksheet containing my formulas. in that worksheet I have a named range in a

I have a workbook with a worksheet containing my formulas. in that worksheet I have a named range in a cell called "FORMULA_VERMELL" containing the text "="TMP!A1"" (I plan to contain a more complicated formula in the future, of course)

In another worksheet called TMP, I have a value '123' in the cell A1

in another cell from TMP I am calling my custom vb function TextToFormula:

Public Function TextToFormula(cellRef As String)
    TextToFormula = Evaluate(cellRef)
End Function

... like this: =TextToFormula(FORMULA_VERMELL)

This converts a text containing a formula, into a real formula and evaluates it.

The problem is that if I change the value in A1 from '123' to another value, the cell containing the formula
=TextToFormula(FORMULA_VERMELL)
does not automatically change, as it is not directly referencing the A1 formula, but using the named range. So I have to edit the cell with F2+ENTER for it to recalculate.

Thanks in advance !

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1736110516a3860615.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信