Working on hiding blank rows in range A49:A103 except 10.
Dim i as Integer
Have the following so far as I am debugging, but keep getting errors at the next i
Set rng = Range("A103:A49") 'I want to work upwards in my range from A103 to A49
.Range("49:103").EntireRow.Hidden = False
If fCount < 45 Then 'fCount is a variable that counts the number of subfolders in a folder, this counts correctly
BlankRows = 55 - fCount 'BlankRows if a variable that subtracts the number of folders from the 55 rows in the range. This is how many blank rows there are in total
For i = BlankRows To 10 Step -1 'I want to hide all of the blank rows from A103 working up towards A49, but want to leave 10 blank rows, and this is where I am missing something. I am not too sure if I have the For i statement in the wrong order with the For Each cell in rng statement or something else...
For Each cell In rng \*\*\*
If cell.Value = "" Then
cell.EntireRow.Hidden = True
Else
cell.EntireRow.Hidden = False
End If
Next i
Else
'Unhide all rows, otherwise
.Range("49:103").EntireRow.Hidden = False
End If