T
TiDz
Hi
I need help to edit macro below that specific range of rows could
hiding/unhiding depending on the top input value.
In this instance the results are changing dynamically when the input values
are changed:
"Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngIn As Range
Dim rngOut As Range
Dim iMax As Long
Set rngIn = Me.Range("A1:C1")
Set rngOut = Me.Range("A3:A40")
iMax = Application.Max(rngIn)
If Not Intersect(rngIn, Target) Is Nothing Then
On Error GoTo XIT
Application.EnableEvents = False
Range(rngOut, rngOut.End(xlDown)).ClearContents
Set rngOut = rngOut.Resize(iMax + 1)
rngOut(1) = 0
rngOut.DataSeries Rowcol:=xlColumns, Type:=xlLinear, _
Step:=1, Trend:=False
End If
XIT:
Application.EnableEvents = True
End Sub"
Thanx in advance!
I need help to edit macro below that specific range of rows could
hiding/unhiding depending on the top input value.
In this instance the results are changing dynamically when the input values
are changed:
"Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngIn As Range
Dim rngOut As Range
Dim iMax As Long
Set rngIn = Me.Range("A1:C1")
Set rngOut = Me.Range("A3:A40")
iMax = Application.Max(rngIn)
If Not Intersect(rngIn, Target) Is Nothing Then
On Error GoTo XIT
Application.EnableEvents = False
Range(rngOut, rngOut.End(xlDown)).ClearContents
Set rngOut = rngOut.Resize(iMax + 1)
rngOut(1) = 0
rngOut.DataSeries Rowcol:=xlColumns, Type:=xlLinear, _
Step:=1, Trend:=False
End If
XIT:
Application.EnableEvents = True
End Sub"
Thanx in advance!