ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Empty Cell (https://www.excelbanter.com/excel-programming/298672-empty-cell.html)

No Name

Empty Cell
 
What is the character for an empty cell? If I use 0,
this is what I have.

If (Range("A" & n).Value) = 0 Then

I want the 0 to be replaced with an empty cell
character. Thank you.

yogendra joshi

Empty Cell
 
try using (Range("A" & n).Value) = ""

wrote:

What is the character for an empty cell? If I use 0,
this is what I have.

If (Range("A" & n).Value) = 0 Then

I want the 0 to be replaced with an empty cell
character. Thank you.



CB Hamlyn

Empty Cell
 
If IsEmpty(Range("A" & n).Value) Then
'do stuff
End If

Good Luck
CB

wrote in message
...
What is the character for an empty cell? If I use 0,
this is what I have.

If (Range("A" & n).Value) = 0 Then

I want the 0 to be replaced with an empty cell
character. Thank you.




CB Hamlyn

Empty Cell
 
You could also do this:

If Len(Range("A" & n).Value) = 0 Then

Which might run a bit faster, but I haven't tested both to see.
CB Hamlyn

wrote in message
...
What is the character for an empty cell? If I use 0,
this is what I have.

If (Range("A" & n).Value) = 0 Then

I want the 0 to be replaced with an empty cell
character. Thank you.




tod

Empty Cell
 
Try

If Len(Range("A" & n).Value) = 0 Then

tod

-----Original Message-----
What is the character for an empty cell? If I use 0,
this is what I have.

If (Range("A" & n).Value) = 0 Then

I want the 0 to be replaced with an empty cell
character. Thank you.
.



All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com