View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Conan Kelly Conan Kelly is offline
external usenet poster
 
Posts: 98
Default Replacing "NULL"

Hello all,

I'm pasting data from SQL Server to Excel, so a lot of cells end up with "NULL" in them. I'm running the following statement to try
to clear the contents of these cells:

Selection.Replace "NULL", Null, xlPart, xlByRows, False, False, False

The problem I'm having is that it is a crap shoot as to whether the cell contents are actually cleared or just replaced with an
apostrophe (').

Any suggestions on how I can modify the statement above (or a different statement to use) that will actually clear the contents of
each of these cells?

Thanks for any help anyone can provide,

Conan Kelly