If A cell Is null Do Nothing.

  • Thread starter Thread starter Ardy
  • Start date Start date
A

Ardy

Hello All:
Assuming I have several functions that are all dependent on a cell,
lets say A2 to have a value, by value I mean not null(Value could be
Alpha or numeric). How would I do a condition that if cell A2 or for
that fact a range A2:A43 is null give a message with OK option and do
nothing.

Regards
Ardy
 
Thanks........
If i do This I won't get any result
Sub CellEmpty()
If IsEmpty(Range("A2:A5")) Then
MsgBox ("You Have An Empty Cell")
End If

If i do this then I get the msg box.
Sub CellEmpty()
If IsEmpty(Range("A2")) Then
MsgBox ("You Have An Empty Cell")
End If

Why the range dosn't work
 
Or you could use:

if application.counta(range("a2:a5")) = 0 then
'all empty
else
'at least one cell has something in it
end if
 
John, Dave
Thank You for your help., Dave I have used your sujjestion for the
range with a bit of modification, works fine.

Much Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top