Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Meenachi Suppiah   on Feb 02 In MS Office Category.

  
Question Answered By: Murad Bashara   on Feb 02

I've never tried deleting rows, but below is what I use for hiding them;

Sub HideEmpty()
Sheet1.Unprotect
Application.ScreenUpdating = False

BeginRow = 20
EndRow = 1000
ChkCol = 1

For rowcnt = BeginRow To EndRow
If Sheet1.Cells(rowcnt, ChkCol).Value < 1 Then
Sheet1.Cells(rowcnt, ChkCol).EntireRow.Hidden = True
Else
If Sheet1.Cells(rowcnt, ChkCol).Value = "AutoHide.Sheet.Stop"
Then Exit For
Sheet1.Cells(rowcnt, ChkCol).EntireRow.Hidden = False
End If
Next rowcnt

Sheet1.Protect
Application.ScreenUpdating = True
End Sub

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 


Tagged: