Eliminate one cell
Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange.Cells
if rcell.address = "$C$1" then
'skip it
else
If UCase(Left(rCell.FormulaR1C1, 8)) = "=VLOOKUP" Then
rCell.Value = rCell.Value
end if
end if
Next rCell
Steph wrote:
Hi. The code below scans an entire worksheet, and hardcodes and cell with a
vlookup formula in it. How can I vary this to EXCLUDE cell C1, meaning
leave the vlookup formula in cell C1? Thanks!
Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange.Cells
If UCase(Left(rCell.FormulaR1C1, 8)) = "=VLOOKUP" Then rCell.Value =
rCell.Value
Next rCell
--
Dave Peterson
|