在 EXCEL 中显示带有值而不是引用的公式

Show formula with values instead of reference in EXCEL

我遇到了与本主题中所述类似的问题: Show formula of a cell, but values instead of references

但我需要像

那样显示

公式直接在excelsheet中。提前感谢您的回答!

使用@SiddharthRout 函数... 第一的;将 Function 作为模块放入您的工作簿中。在“开发人员”选项卡下,select Insert_Module,复制并粘贴函数。 第二;将以下子项目保存在 ThisWorkbook 文件夹中的项目 window 中...

Sub ShowFormulValues()
Dim lRow As Long
lRow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row

    Range("B1:B" & lRow).Formula = "=ConvertToValues(A1)"
End Sub

运行 ShowFormulValues Sid 的公式将提供您想要的信息。