开发者

Populating blank cells with a formula in Excel (without VBA)

开发者 https://www.devze.com 2023-01-13 00:40 出处:网络
e.g. (N.B. All the following actions reference the same cell) A cell contains a formula to populate the \'default\' value of that

e.g.

(N.B. All the following actions reference the same cell)

  1. A cell contains a formula to populate the 'default' value of that cell.
  2. The user overwrites the default value.
  3. The user decides to delete the value that they have entered.
  4. The original formula is automat开发者_运维问答ically reinstated to provide the 'default' value again.

Is this possible without VBA, or is there a reasonable work around?


I'm not sure how you plan to do all of that without VBA. I'm not and Excel wizard, but I don't think it can done without VBA. There is some intelligence needed in your procedures that can not (I believe) be performed with simple functions.


AFAIK this is not possible.

Obviously, when you write a value you are overwriting the pre-existent formula. So you need to store the formula somewhere else to be able to restore it. But as the circular reference detection in Excel is "static", it is forbidden for a formula to write to another cell. You can look for example at the UDF feature, where this is clearly stated out.

The only other place I know to store (and execute) something within the Excel environment is VBA code ...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号