MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Impossible Request!

Posted by Melissa Boggan on December 20, 2001 9:46 PM

I am somewhat of an amateur, and I have a manager who expects me to figure out an Excel problem beyond my experience. Anyone know how to format a worksheet so that only rows with nonblank cells in a certain column will show/print?

Posted by Colo on December 20, 2001 10:24 PM

Can I use macro?
Please Paste mojule, and run "RowHiddenTrue"
If you do not want to hide then run "RowHiddenFalse"

Sub RowHiddenTrue()
Dim rng As Range
Set rng = Cells.SpecialCells(xlCellTypeConstants)
Cells.EntireRow.Hidden = True
rng.EntireRow.Hidden = False
Application.Goto Range("A1")
End Sub

Sub RowHiddenFalse()
Cells.EntireRow.Hidden = False
End Sub

Posted by Melissa on December 20, 2001 10:36 PM

I'm confused! (macro newbie)
Does anyone have time to walk me through this step by step? I know how to start the Macro recorder and accomplish basics. Sorry if this is a pain in the @#%.... I catch on quick, I swear!

Posted by Bruno on December 20, 2001 11:07 PM

Hi Melissa,

This is maybe a short :

- select all your data (example A1:F100)
- use menu Data / Filter / Autofilter
- in the first row of your data you will now see dropdown lists
- at the bottom of these lists are selections like : empty cells/ not empty cells

Hope this helps...


Posted by Kevin on December 21, 2001 6:19 AM

Go to the Tools menu, select macro, and select visual basic editor. When the VB editor screen opens, go to the insert menu, and select module. A blank white module window opens up. In this window, paste the code that they mentioned to you in the previous posts. Then save your spreadsheet. Then run the macros as instructed. Let us know if you have any additional problems, and good luck.