ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to hide rows. (https://www.excelbanter.com/excel-programming/289028-macro-hide-rows.html)

steve

Macro to hide rows.
 
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.

Frank Kabel

Macro to hide rows.
 
Hi Steve

I would use Filter / Autofilter for this (goto "Data - Filter") and
filter all 'non blanks#

HTH
Frank

Steve wrote:
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.




Otto Moehrbach[_6_]

Macro to hide rows.
 
What do you want to do with the rows that are left visible. Do you want to
print them? Copy them? Just look at them? HTH Otto
"Steve" wrote in message
...
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.




No Name

Macro to hide rows.
 
The document is a fax form.
-----Original Message-----
What do you want to do with the rows that are left

visible. Do you want to
print them? Copy them? Just look at them? HTH Otto
"Steve" wrote in

message
...
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity

celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.



.


Otto Moehrbach[_6_]

Macro to hide rows.
 
One way:
Say that Column B is the column that contains the criteria for hiding the
rows. That is, you want to hide all the rows that are blank in Column B.
Say your data goes from B1 to B50. Select B1:B50. Hit the F5 key (the GoTo
key), click on Special at the bottom of the GoTo box. Click on the radio
button for blanks. Click OK. All the blank cells in B1:B50 will now be
selected. Run the following macro. It will hide all the rows that are
blank in B1:B50.
HTH Otto
Sub HideBlankRows()
Dim i As Range
For Each i In Selection
i.EntireRow.Hidden = True
Next i
End Sub
wrote in message
...
The document is a fax form.
-----Original Message-----
What do you want to do with the rows that are left

visible. Do you want to
print them? Copy them? Just look at them? HTH Otto
"Steve" wrote in

message
...
I have a stock order form. I want to find a way to hide
rows containg items that do not need to be ordered. for
example:

A B
1 paper 2
2 ink
3 pens 4
4 staples

Is there a macro that can filter out empty quantity

celss
and hide the whole row (rows 2 and 4 in this instance)?
I appreciate your time and effort.
Steve.



.





All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com