View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default VBA code to delete cell contents

..Value = "" works on multiple cells as well..

"Per Jessen" wrote:

Hi

When I delete the contents of a single cell, I usually use .Value="" as you
do, but when I want to delete contents multiple cells, I use .ClearContents
which delete the content of the cells.

Using .Clear will not only delete the content but also clear any formating
in the cell(s).

Regards,
Per

"Robert Crandal" skrev i meddelelsen
...
How does everybody write code to delete the contents of
a cell, such as cell "A1"???

I normally use the following code:

Range("A1").Value = ""

Is that correct?? I get the feeling that I am setting cell "A1"
to an empty string, rather than actually deleting the current
contents.



.