Empty cell

Closed
Mike - Jul 6, 2010 at 10:49 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 6, 2010 at 06:51 PM
Hello,

I need to know how to empty a cell by code


1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 6, 2010 at 06:51 PM
many ways, depends on what you want

Range("Z1").clear
Cells(1,26).clear

the above clears value, format etc from Z1

Range("Z1").clearContents
Cells(1,26).clearContents
the above only clears value from Z1


Range("Z1") =""
Cells(1,26) = ""
Range("Z1") = vbNullString
Cells(1,26) = vbNullString

the above but a blank string in cell Z1
0