Using a macro to hide cells with out a value?

  • Thread starter Thread starter Scott Streit
  • Start date Start date
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.
 
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
 
Back
Top