Hi
I've been looking through the threads and cannot seem to find a similar thread.
I have a workbook with where I have two sheets. ("Data" and "Report")
The 'data' sheet has multiple options and drop down which trigger cells in the 'report' sheet to either have a sentence or a tigger word "hide".
Basically - I want all the cells with 'hide; in to hide (or row to hide) and everything else to show.. ideally with ae-size function.
I've been trying to adapt this - butwith no joy in ('data')
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim CheckNum As Long
Application.ScreenUpdating = False
with sheets("report")
If Not Intersect(Target, Range("e2:e259")) Is Nothing Then
For CheckNum = 259 To 1 Step -1
If Cells(CheckNum, 5).Value = "hide" Then
Cells(CheckNum, 5).EntireRow.Hidden = True
Else: Cells(CheckNum, 5).EntireRow.Hidden = False
Cells(CheckNum, 5).Rows.EntireRow.AutoFit
End If
Next CheckNum
End If
Application.ScreenUpdating = True
End Sub
any help would be great
I've been looking through the threads and cannot seem to find a similar thread.
I have a workbook with where I have two sheets. ("Data" and "Report")
The 'data' sheet has multiple options and drop down which trigger cells in the 'report' sheet to either have a sentence or a tigger word "hide".
Basically - I want all the cells with 'hide; in to hide (or row to hide) and everything else to show.. ideally with ae-size function.
I've been trying to adapt this - butwith no joy in ('data')
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim CheckNum As Long
Application.ScreenUpdating = False
with sheets("report")
If Not Intersect(Target, Range("e2:e259")) Is Nothing Then
For CheckNum = 259 To 1 Step -1
If Cells(CheckNum, 5).Value = "hide" Then
Cells(CheckNum, 5).EntireRow.Hidden = True
Else: Cells(CheckNum, 5).EntireRow.Hidden = False
Cells(CheckNum, 5).Rows.EntireRow.AutoFit
End If
Next CheckNum
End If
Application.ScreenUpdating = True
End Sub
any help would be great