Solved

Delete blanks

Posted on 2011-03-17
3
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA macro broke in Excel 2016 in windows 10 5 62
Consolidate xl 2010 worksheets with text 2 19
Hard coding time and date into Excel 2 30
ADD New Entries 7 15
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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 how to use a scrolling table in Microsoft Excel using the INDEX function.

930 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

9 Experts available now in Live!

Get 1:1 Help Now