【问题标题】:Paste Value all the cells in a given sheet if Cell has Vlookup formula..如果单元格具有 Vlookup 公式,则粘贴给定工作表中的所有单元格。
【发布时间】:2012-01-10 10:50:24
【问题描述】:
=VLOOKUP(VALUE($B$100);INDIRECT("2011.xls!"&D$101;0);3;0)
我有一张表要发送给其他人,但我无法发送 2011.xls,因为它包含机密信息。我如何复制粘贴值该表中的所有单元格(“中心”),其公式如下
=VLOOKUP(价值($B$100);间接
还是包含 VLOOKUP ?
通常我会断开链接,但因为我已将表数组与间接链接,它不被视为链接
【问题讨论】:
标签:
loops
excel
excel-2007
vba
【解决方案1】:
此过程循环遍历工作表上的所有单元格并将所有 VLOOKUP 公式更改为值:
Sub RemoveVlookupFormulas()
Dim rng As Range
With Worksheets("Centers")
For Each rng In .UsedRange
If rng.Formula Like "*VLOOKUP*" Then rng.Formula = rng.Value
Next rng
End With
End Sub