View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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