[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 98
  • Last Modified:

Complete remove blank line in Excel

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
AXISHK
Asked:
AXISHK
1 Solution
 
Wayne Taylor (webtubbs)Commented:
Try this....

Range(Cells(2, 1), Cells(Rows.Count, 1)).EntireRow.Delete
0
 
AXISHKAuthor Commented:
Tks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now