Tried to incorporate the before mentioned with no luck. However, I did get this work-around to have it do what I want. I made a marco that simply copy and pastes (value) to the cell I needed the number in. I made cell M2 pull the number from the data sheet using. Since M2 it is a formula and doesn't affect change events, I just had the macro auto-run when the sheet was select which pasted the value to cell N2 (the reference cell). That seems to trigger the change event and the rows are auto adjusted.
Private Sub Worksheet_Activate()
'
' IJ1PASTEVAL Macro
'
'
Range("M2").Select
Application.CutCopyMode = False
Selection.Copy
Range("N1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J1").Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("N1")) Is Nothing Then
Rows("3:252").Hidden = True
Select Case Target.Value
Case Is <= 9
Rows("3:47").Hidden = False 'Page 1
Case Is <= 18
Rows("3:92").Hidden = False 'Page 2
Case Is <= 27
Rows("3:137").Hidden = False 'Page 3
Case Is <= 36
Rows("3:182").Hidden = False 'Page 4
Case Is <= 45
Rows("3:227").Hidden = False 'Page 5
Case Is > 45
Rows("3:252").Hidden = False 'Page 6
Case Else
Rows("3:252").Hidden = True
End Select
End If
End Sub
Bookmarks