Using a macro to hide cells with out a value?

S

Scott Streit

I have a spec sheet from a manufacturer that has shipping
weight,volume, pallet count, and price listed per item. I use that
sheet to enter purchase quantities per item and let it calculate the
total weight, cubic ft, pallet count. and the purchase price.

My question is can i make a macro that will hide all of the rows that
don't contain a value in column A1 (order quantiti) so when i print the
sheet, it will only include items that are desired for that particular
order.

The entire sheet contains a few hundred rows so it makes it to large to
print the whole thing.
 
R

Ron de Bruin

Hi Scott

See
http://www.rondebruin.nl/print.htm#Hide

Look at the example below the macro

With ActiveSheet
On Error Resume Next
.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
.PrintOut
.Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = False
On Error GoTo 0
End With
 

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

Top