On 2002-03-06 15:44, jeffmfrank wrote:
this one works perfectly! EXCEPT it stops at row 61?? and how do I apply it to multiple sheets?
Like this?:
For Each c In Sheets("sheet1","sheet2").Range("T1", Range("T65536").End(xlUp).Address)
Is row 61 the last row in column T with data in it?
To apply it to multiple sheets use:
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Application.ScreenUpdating = False
For Each c In Sheets("Sheet1").Range("T1", Range("T65536").End(xlUp).Address)
Select Case c.Value
Case Is = "Y"
c.EntireRow.Hidden = True
Case Is = "N"
c.EntireRow.Hidden = False
End Select
Next c
For Each c In Sheets("Sheet2").Range("T1", Range("T65536").End(xlUp).Address)
Select Case c.Value
Case Is = "Y"
c.EntireRow.Hidden = True
Case Is = "N"
c.EntireRow.Hidden = False
End Select
Next c
Application.ScreenUpdating = True
End Sub
Again, note that this will really slow down performance if you have a lot of data in column T (in either sheet).
Regards,
Like this thread? Share it with others