Solved

Complete remove blank line in Excel

Posted on 2015-01-29
2
93 Views
Last Modified: 2015-01-29
I use the below VBA code to remove the blank lines in Excel. However, it still always detects over six thousands of lines. Any idea ? How to completely remove those records ?  Tks

LastRow = wkRecap.UsedRange.Rows.Count
LastCol = wkRecap.UsedRange.Columns.Count
Range(Cells(2, 1).Address(RowAbsolute:=False, ColumnAbsolute:=False) & ":" & Cells(LastRow, LastCol).Address(RowAbsolute:=False, ColumnAbsolute:=False)).Delete
0
Comment
Question by:AXISHK
2 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 40578879
Try this....

Range(Cells(2, 1), Cells(Rows.Count, 1)).EntireRow.Delete
0
 

Author Closing Comment

by:AXISHK
ID: 40578902
Tks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question