|I've been reading the different forums looking for possible codes that i could interpret and modify in order to get my worksheet to work 'properly' but haven't had any luck.|
To put it simply, I have a worksheet that i need help hiding rows for. The rows that will be hidden will vary on the value of a cell in the worksheet. For example: if the value of A1=1 then rows 62-340 should hide, if A1=2 then rows 93-340 should hide, and so on... and if the value is other than the values determined in the formula (ie -1-6, and 7 is placed in the cell), then rows 31-340 should hide. I was able to get the first value of 1 and the exception number (7) to be recognized with the following formula, but can't get it to work with the other 'options'. Please help!
Private Sub Worksheet_Calculate()
If Range("I1").Value = 1 Then
Rows("62:340").Hidden = True
Rows("62:340").Hidden = False