Solved

Complete remove blank line in Excel

Posted on 2015-01-29
2
94 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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