Printing if a cell is blank

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

I have some code that selects sheets by sheet name. But I
also want to select some other sheets if they are not
blank. The user will click on a button to do this and then
I want to print all those sheets selected. I can do all
of this apart from selecting the sheets that are not blank
Can anyone help?

Thanks,

Martin
 
Hi Martin,
There is a conflict between the subject and text in the body.
But since you say you know how the handle the rest, the part
you are looking for is probably one of the following:

If you want the equivalent of a single cell checked to see if
it is blank (or not blank) use ISEMPTY(...) in VBA for the
equivalent of ISBLANK(...) Worksheet Function.

If you want to see if there is any constant data anywhere on the sheet
IF Cells.SpecialCells(xlConstants).Count <> 0 then ...

For those that want to know how to cycle through a selection
of worksheets see http://www.mvps.org/dmcritchie/excel/insrtrow.htm
look for modification by Gary Brown
 

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