Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

:::  Excel - How to suppress blanl lines from an Excel sheet (tab) ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
infojacques@gmail.com - 18 Apr 2007 19:26 GMT
Hello,

Has any one a macro to suppress the blank lines of an Excel sheet
(tab)?

Many thanks in advance,

Jacques
Gord Dibben - 18 Apr 2007 20:01 GMT
Can be done without a macro.

Select a column and F5>Special>Blanks>OK

Format>Row>Hide.

If you want a macro................

Sub HidEmptyRows()
''only if entire row is blank
   LastRow = ActiveSheet.UsedRange.Row - 1 + _
           ActiveSheet.UsedRange.Rows.Count
   Application.ScreenUpdating = False
   For r = LastRow To 1 Step -1
       If Application.CountA(Rows(r)) = 0 Then
       Rows(r).Hidden = True
      ' Rows(r).Delete
       End If
   Next r
End Sub

Gord Dibben  MS Excel MVP

>Hello,
>
[quoted text clipped - 4 lines]
>
>Jacques
infojacques@gmail.com - 18 Apr 2007 20:25 GMT
Thank you GD !
You solutions woks perfectly !
Have a great evening !
Jacques
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.