Home |
Search |
Today's Posts |
#1
|
|||
|
|||
macro to hide rows
I need to hide rows depending on whats in the cells (a1,a2,a3,...) can somewane give me a example of a macro for this. thank you |
#2
|
|||
|
|||
I find this an easier alternative:
Apply Data|filter|autofilter to your column (or whole range). Then use the filter arrow to show/hide the rows you want. If you've never used autofilter before, Debra Dalgleish has some info at: http://www.contextures.com/xlautofilter01.html david wrote: I need to hide rows depending on whats in the cells (a1,a2,a3,...) can somewane give me a example of a macro for this. thank you -- Dave Peterson |
#3
|
|||
|
|||
David,
something like this: just subsitute the number of rows in the For loop and the values you want to test. Sub Hide_Unwanted_Rows() Dim X as Integer For X = 2 to 100 If cells(x,1).value =0 Then Rows(x).hidden=true End if Next x End Sub Cheers, Pete. "david" wrote: I need to hide rows depending on whats in the cells (a1,a2,a3,...) can somewane give me a example of a macro for this. thank you |
#4
|
|||
|
|||
thanks !!!!!!!!!!! ------------------------------------------------------ "Pete McCosh" wrote: David, something like this: just subsitute the number of rows in the For loop and the values you want to test. Sub Hide_Unwanted_Rows() Dim X as Integer For X = 2 to 100 If cells(x,1).value =0 Then Rows(x).hidden=true End if Next x End Sub Cheers, Pete. "david" wrote: I need to hide rows depending on whats in the cells (a1,a2,a3,...) can somewane give me a example of a macro for this. thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inset rows and copy formatting , excel macro | Excel Discussion (Misc queries) | |||
how to hide rows in a protected sheet | Excel Worksheet Functions | |||
Adding Rows to Master Sheet | New Users to Excel | |||
Macro to hide rows with empty cells | Excel Worksheet Functions | |||
Macro for sorting different rows | Excel Worksheet Functions |