ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can Excel hide a row automatically based on value in a cell? (https://www.excelbanter.com/excel-programming/333822-can-excel-hide-row-automatically-based-value-cell.html)

RJQMAN[_3_]

Can Excel hide a row automatically based on value in a cell?
 
I am using Excel 2000. I would like to create a worksheet that would
automatically hide certain rows depending on a value in a cell in a different
row (or in the row, if that would work better). The worksheet would have,
say, 3 groups of 26 rows. I will be sharing the worksheet with others and I
want to make it as user-friendly as possible. Some users may only use 6 or 7
rows in one group, and 10 rows in the second group, and perhaps no rows in
the third group. Each user will have a different need. I would like to be
able to enter a value into three cells and have the extra rows not appear in
each group. I do not want the user to have to go to the toolbar to hide or
filter out rows that are not used if that can be avoided. Is there any way
to do this?

Thanks.

Toppers

Can Excel hide a row automatically based on value in a cell?
 
Hi,
This shows the principle of what needs to be done. You will need to
decide how you assign which rows are to be hidden - is this a table per user
per group?

Sub HideRows()

Dim HiddenRows(3) As String
Dim i As Integer

HiddenRows(1) = "4:4,6:6,7:7,11:11,12:12"
HiddenRows(2) = "4:4,6:6,7:7"
HiddenRows(3) = "4:4,6:6,11:11,12:12"

For i = 1 To 3
Range(HiddenRows(i)).Select
Selection.EntireRow.Hidden = True
Next i

End Sub

"RJQMAN" wrote:

I am using Excel 2000. I would like to create a worksheet that would
automatically hide certain rows depending on a value in a cell in a different
row (or in the row, if that would work better). The worksheet would have,
say, 3 groups of 26 rows. I will be sharing the worksheet with others and I
want to make it as user-friendly as possible. Some users may only use 6 or 7
rows in one group, and 10 rows in the second group, and perhaps no rows in
the third group. Each user will have a different need. I would like to be
able to enter a value into three cells and have the extra rows not appear in
each group. I do not want the user to have to go to the toolbar to hide or
filter out rows that are not used if that can be avoided. Is there any way
to do this?

Thanks.


DM Unseen

Can Excel hide a row automatically based on value in a cell?
 
Use XL Advanced filter,

DM Unseen



All times are GMT +1. The time now is 05:13 PM.

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