View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Becki Becki is offline
external usenet poster
 
Posts: 4
Default Hide unused rows based on column info

Jacob - thank you. I followed your directions (you are very helpful to the
amateur) but it doesn't seem to do anything at all when I hit run/play. I
haven't yet assigned a button but nothing is hiding with this.

Becki

"Jacob Skaria" wrote:

Try the below macro..If you are new to macros set the Security level to
low/medium in (Tools|Macro|Security). From workbook launch VBE using
short-key Alt+F11. From menu 'Insert' a module and paste the below code.
Save. Get back to Workbook. Run macro from Tools|Macro|Run <selected macro()
You can assign a hot key for this macro or place a autoshape (say bevel) from
DrawingToolbar and right clickAssign macro...to make it work at click.

Sub Mac()
For lngRow = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If IsNumeric(Range("D" & lngRow)) = False Then _
Rows(lngRow).Hidden = True
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Becki" wrote:

Help is much appreciated. I need a check box or easily clicked way to
hide/unhide a range of rows based on the data in a column.

Example: Rows 1:130 contain product info. Column D contains a chosen
Quantity (number). I would like to easily show/hide any rows that do not have
a number in Column D.

Thanks for your assistance!