Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Delete blanks

Posted on 2011-03-17
3
154 Views
Last Modified: 2012-05-11
Hi,

I have attached a file. Theres a sub called "Tidy Up" in Module 8.

It should delete blank rows, but when i step through it, it does nothing.

Can anyone see why this is?

Thanks
Seamus
Call-Latest-File.xls
0
Comment
Question by:Seamus2626
3 Comments
 
LVL 18

Accepted Solution

by:
krishnakrkc earned 250 total points
ID: 35155372
HI,

Replace

.Range("A1").CurrentRegion

with

.UsedRange

Kris
0
 
LVL 24

Assisted Solution

by:StephenJR
StephenJR earned 250 total points
ID: 35155381
Seamus - if you want to delete the rows try replacing your line with this:
.Range("A2", .Cells(.Rows.Count, "A").End(xlUp).Offset(1)).SpecialCells(xlCellTypeBlanks).EntireRow.Delete

Open in new window

0
 

Author Closing Comment

by:Seamus2626
ID: 35155398
Cheers guys!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

789 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