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

Tom,

Thanks for all of your help.

If I remember correctly, I had the statement set up this way before I changed the "Replacement" argument to NULL and I had the same
results as what I'm getting now.

I will try it again just to be sure, but any other suggestions will be appreciated.

Thanks again,

Conan


"Tom Ogilvy" wrote in message ...
Selection.Replace "NULL", "", xlPart, xlByRows, False, False, False


--
Regards,
Tom Ogilvy

"Conan Kelly" wrote:

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