Solved

Delete blanks

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
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.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

770 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