if application.CountA(Range("B22:B24")) = 3 then
' all filled
else
msgbox Application.CountBlank(Range("B22:B24")) & " blank cells"
end if
Replae "B22:B24" with myRange if it is a range variable or
Range("myrange") if it is a named range.
if the range is variable, you could do
if application.CountA(Range("B22:B24")) = Range("B22:B24").Count then
or use CountBlank in the original test and check for a value of zero.
--
Regards,
Tom Ogilvy
"Barb Reinhardt" <(E-Mail Removed)> wrote in message
news:A712C6F5-3B31-4341-AB70-(E-Mail Removed)...
>I have a range, let's call it myRange that's cells B22:B24 in my worksheet.
> I need to check that these cells are all not blank before doing something
> else. I'm not sure how to write the code to check that all are
> non-blank.
> Any suggestions?
>
> Thanks
|