如何用公式的输出替换单元格中的公式?

发布于 2024-07-26 20:56:56 字数 150 浏览 4 评论 0原文

如何用公式的输出替换单元格中的公式?

我只需要 "=RIGHT(E86,LEN(E86)+1-FIND("(",E86,1))" 变为 "(e)"

有没有办法对整个工作表执行此操作?替换所有带有公式的单元格及其显示的文本?我使用的是 2003 版本。

How do I replace the formula in a cell with the output of the formula?

I simply need "=RIGHT(E86,LEN(E86)+1-FIND("(",E86,1))" to become "(e)"

Is there a way to do this to the whole sheet? Replace all the cells with formulas with the text they are displaying? I am using version 2003.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

倾城月光淡如水﹏ 2024-08-02 20:56:56

选择要替换的单元格并复制它们。 然后转到“编辑->选择性粘贴”并选择值而不是全部。

由于这不会更改非公式单元格,因此您可以选择整个工作表并复制->选择性粘贴以删除所有公式。

要以编程方式完成此操作,请查看 Steve 的回答。 他有你需要的代码。

Select the cells you want to replace and copy them. Then go to "Edit->Paste Special" and select values instead of all.

Since this doesn't change non-formula cells, you could select the entire sheet and copy->paste special to remove all formulas.

To do it programatically, look at Steve's answer. He's got the code you'll need.

陌伤ぢ 2024-08-02 20:56:56

或者,如果您想避免使用


Dim r as range
For each r in Worksheets("Sheet1").UsedRange.Cells
   r.Value = r.Value
Next

我不擅长处理的剪贴板,那么类似下面的内容将起作用,所以您需要检查语法。

Alternatively something like the following will work if you want to avoid using the clipboard


Dim r as range
For each r in Worksheets("Sheet1").UsedRange.Cells
   r.Value = r.Value
Next

I haven't excel to hand I'm afraid so you'll need to check the syntax.

べ繥欢鉨o。 2024-08-02 20:56:56

另一种方法是:双击相关单元格并按 F9。

Another way to do it: double-click the cell in question and press F9.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文