Michael515
Board Regular
- Joined
- Jul 10, 2014
- Messages
- 136
Hi Y'all,
In constructing an automated worksheet for a project I am working on, I realized it'd be better for me to unhide rows based on a certain cell value, rather than insert rows (Some concatenate cell referencing gets thrown off otherwise). I have listed my working Insert Rows Function below and was wondering if anyone can translate it into an unhide rows function for a specified number of rows based on a value in a cell. If I have been unclear at all, please feel free to ask follow-ups. I appreciate any and all the help!
In constructing an automated worksheet for a project I am working on, I realized it'd be better for me to unhide rows based on a certain cell value, rather than insert rows (Some concatenate cell referencing gets thrown off otherwise). I have listed my working Insert Rows Function below and was wondering if anyone can translate it into an unhide rows function for a specified number of rows based on a value in a cell. If I have been unclear at all, please feel free to ask follow-ups. I appreciate any and all the help!
Code:
Sub InsertFundRows()
Dim i As Integer, n As Integer, m As Long
n = Sheets("Questionnaire").Range("B20").Value
m = Sheets("Questionnaire").Range("B30").Row
For i = 1 To n
Rows(m + 1 * i).Insert
Next i
End Sub