View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mthomas[_6_] mthomas[_6_] is offline
external usenet poster
 
Posts: 1
Default Clear cells with #N/A


I'm using paste/special to remove vlookup functions which leave #N/A
when no matches were found. I'm not getting any errors but I can't get
the current cell to clear if it has the #N/A. Can anyone assist?
Thanks in advance!

For i = 7 To lastRow
If (CStr(Cells(i, "L").Value) = "#N/A") Then
Cells(i, "L").Value.Clear
End If
Next i


--
mthomas
------------------------------------------------------------------------
mthomas's Profile: http://www.excelforum.com/member.php...o&userid=25649
View this thread: http://www.excelforum.com/showthread...hreadid=393138