Hello,
Thanks in advance for any help. I tried another solution found here, but could not adapt it to my needs because my VB knowledge is too limited.
A cell named "No_App" contains an integer 1-26.
Based on the value of this number (N) I want to hide all except the first N rows in the range of rows 11-36.
So if "No_App" is 1, rows 12–36 will become hidden when I run the Macro.
If "No_App" is 10, rows 21–36 will become hidden when I run the Macro.
When I run the macro again, rows which were previously hidden may need to become un-hidden based on the new value.
I also need to integrate this into the following existing Macro.
Sub hpcopy()
'
' hpcopy Macro
'
'
Sheets("HPTOOL").Select
Range("G11:X36").Select
Selection.Clear
Sheets("TABLES").Select
Range("B26:B51").Select
Selection.Copy
Sheets("HPTOOL").Select
Range("firsthp").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Thanks in advance for any help. I tried another solution found here, but could not adapt it to my needs because my VB knowledge is too limited.
A cell named "No_App" contains an integer 1-26.
Based on the value of this number (N) I want to hide all except the first N rows in the range of rows 11-36.
So if "No_App" is 1, rows 12–36 will become hidden when I run the Macro.
If "No_App" is 10, rows 21–36 will become hidden when I run the Macro.
When I run the macro again, rows which were previously hidden may need to become un-hidden based on the new value.
I also need to integrate this into the following existing Macro.
Sub hpcopy()
'
' hpcopy Macro
'
'
Sheets("HPTOOL").Select
Range("G11:X36").Select
Selection.Clear
Sheets("TABLES").Select
Range("B26:B51").Select
Selection.Copy
Sheets("HPTOOL").Select
Range("firsthp").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub