Cell vales

  • Thread starter Thread starter Mike
  • Start date Start date
Test its Value property for not being the empty cell...

If Range("A1").Value <> "" Then

or, alternately, test the length of the Value for being larger than zero...

If Len(Range("A1").Value) > 0 Then
 
If you want to look for an empty cell -- no formula that evaluates to "".

if isempty(worksheets("Somesheetnamehere").range("A1").value) then
'it's empty
else
'it's got something in it.
end if

checking for "" with something like this may not be enough:

if worksheets("Somesheetnamehere").range("A1").value = "" then
'cell looks empty, but it may have a formula that evaluates to ""
'it may even be empty
else
'cell has something in it for sure
end if
 
Back
Top