deleting blank rorws

  • Thread starter Thread starter VRaybandb
  • Start date Start date
V

VRaybandb

I imported some information from a web page and when it loaded it has huge
amounts of blank rows, how can I delete these without doing each small bunch
of rows individually. Ex: I have the company name and then 12 rows later I
get the phone number then five rows later there is the address. I might add
that it is not uniform in any way now of the blanks row amounts are the same.
All total there should be 101 company entries that should take up about 404
rows, but instead it takes up 19822. Oh and all this information is only in
column A (which is OK but most of your help answers say I need more than one
column of data). Please help, I know there has to be an easier way. I hope
that you understand this as it is hard to explain.
 
Try this small macro:

Sub rowkiller()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
If Cells(i, 1).Value = "" Then
Cells(i, 1).EntireRow.Delete
End If
Next
End Sub
 
OK Gary I am stupid, I am not sure where I am suppose to insert the macro?
Can you give me the "how to delete rows for dummies"?
Thanks
 
an option may be to use filters, then set the filter to blank rows and delete
them all that way. Select all the data by clicking on the block above 1 and
to the left of A. Then select data/Filter, then click on the pull-down and
select "blank rows". You can then just delet ALL the rows that are left, and
these will be the blank rows you want to get rid of
 
Select column A then F5>Special>Blanks.

Edit>Delete>Entire Row.


Gord Dibben MS Excel MVP
 
Thank you so much, that was so easy and I just knew that there had to be an
EASY way and this was way too easy.
Thank you soooooo much,
 
Back
Top