VBA: hide row if cell in row is blank


Posted by Squirrel on February 14, 2002 2:04 PM

My workbook (template) uses one sheet to enter daily production, have 6 other sheets (machines) that list production for the day using vlookup, then I hide product rows not being run that day on all 6 sheets for print.How would you write a vba macro that will look at col g(scheduled units) of each of the 6 sheets and hide the rows that do not have a scheduled qty.
GOT MILK?



Posted by Dreamboat on February 14, 2002 7:25 PM

You could start (since I see no other responses here) by recording a macro. Select column G, hit Edit-Go to-Special-Blanks. Then Format-Row-Hide. You'll have to do it on each sheet because when I did it grouped, it didn't work right.

Edit your code. At the beginning of it, put:

Application.screenupdating = false

and at the end of the code:

Application.screenupdating = true

so you don't have to watch it flash all over the place. I do believe that you can group the sheets to unhide all of the rows when you're done so you could record that.