View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Test For BLANK Range

Try it on a fresh blank worksheet. It should give 0 for any Select'ed block
of cells
--
Gary''s Student - gsnu200742


"RayportingMonkey" wrote:

Actually, it seems to return a 1 no matter what...

"Gary''s Student" wrote:

It depends on "how" blank:

Sub blanket()
MsgBox (Application.WorksheetFunction.CountA(Selection))
End Sub

will return zero if the cells Selected are empty. It will return 1 if one
of the cells contains something like:
=""
--
Gary''s Student - gsnu200742


"RayportingMonkey" wrote:

I need to write an IFTHENELSE statement that will look at a range to
determine if it is blank or not. If it is blank I need to throw a messagebox.
If not, I need to continue.

My problem is that I can see how to do this with a formula in a sheet, but
don't want the results (or the formula for that matter) to appear on my
worksheet.

Any help is appreciated!

Thanks,
Ray