Solved

Complete remove blank line in Excel

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now