Sean15
Well-known Member
- Joined
- Jun 25, 2005
- Messages
- 719
- Office Version
- 2010
- Platform
- Windows
Hi:
I adapted codes below from old online codes. Code is supposed to hide all blank rows after last row of data in Column C (well, that’s my intent). The code runs very slow. Also, after executing code, there are two blank rows after the last row of data. Blank rows should be hidden after the code executes. Could someone fix code to?
Make it run faster
Hide all blank rows after last row of data in column C.
Thank you for your help.
I adapted codes below from old online codes. Code is supposed to hide all blank rows after last row of data in Column C (well, that’s my intent). The code runs very slow. Also, after executing code, there are two blank rows after the last row of data. Blank rows should be hidden after the code executes. Could someone fix code to?
Make it run faster
Hide all blank rows after last row of data in column C.
VBA Code:
Sub HideRowCellTextValue()
Rows.EntireRow.Hidden = False
Application.ScreenUpdating = False
StartRow = 12
LastRow = 1233
iCol = 3
For i = StartRow To LastRow
If Cells(i, iCol).Value <> "" Then
Cells(i, iCol).EntireRow.Hidden = False
Else
Cells(i, iCol).EntireRow.Hidden = True
End If
Next i
Application.ScreenUpdating = True
End Sub
Thank you for your help.
Last edited by a moderator: