M
maacmaac
I want to hide certain rows given a certain value. I.E. if a user
enters a value of 3 securities, I want to hide rows 14-40. If a user
enters a value of 6 securities, I want to hide rows 17-40.
I have tried to write a macro using the offset button, but cannot get
it to work.
Any help? See attached file.
Thanks.
Sub HideRows()
'
'
'
Rows.Offset("G4+11:40").Select
Range("B14").Activate
Selection.EntireRow.Hidden = True
Range("B3").Select
End Sub
Attachment filename: loop.macro.problem.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=382425
enters a value of 3 securities, I want to hide rows 14-40. If a user
enters a value of 6 securities, I want to hide rows 17-40.
I have tried to write a macro using the offset button, but cannot get
it to work.
Any help? See attached file.
Thanks.
Sub HideRows()
'
'
'
Rows.Offset("G4+11:40").Select
Range("B14").Activate
Selection.EntireRow.Hidden = True
Range("B3").Select
End Sub
Attachment filename: loop.macro.problem.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=382425