我有类似于本主题中描述的问题:Show formula of a cell, but values instead of references
但我需要表现出来
直接在excel表中的公式。提前谢谢你的答案!
使用@SiddharthRout函数......首先;将Function
作为模块放在工作簿中。在Developers选项卡下,选择Insert_Module
,复制并粘贴Function。第二;将以下子保存在ThisWorkbook
文件夹的Project窗口中...
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的公式将提供您想要的信息。