A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

deleting blank rorws



 
 
Thread Tools Display Modes
  #1  
Old December 9th, 2008, 07:25 PM posted to microsoft.public.excel.misc
VRaybandb
external usenet poster
 
Posts: 3
Default deleting blank rorws

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.
--
VRaybandb
  #2  
Old December 9th, 2008, 07:32 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
Default deleting blank rorws

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

--
Gary''s Student - gsnu200819


"VRaybandb" wrote:

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.
--
VRaybandb

  #3  
Old December 9th, 2008, 08:00 PM posted to microsoft.public.excel.misc
VRaybandb
external usenet poster
 
Posts: 3
Default deleting blank rorws

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
--
VRaybandb


"Gary''s Student" wrote:

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

--
Gary''s Student - gsnu200819


"VRaybandb" wrote:

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.
--
VRaybandb

  #4  
Old December 9th, 2008, 09:09 PM posted to microsoft.public.excel.misc
fdibbins
external usenet poster
 
Posts: 8
Default deleting blank rorws

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

"VRaybandb" wrote:

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.
--
VRaybandb

  #5  
Old December 10th, 2008, 04:20 AM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default deleting blank rorws

Select column A then F5SpecialBlanks.

EditDeleteEntire Row.


Gord Dibben MS Excel MVP

On Tue, 9 Dec 2008 11:25:01 -0800, VRaybandb
wrote:

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.


  #6  
Old December 10th, 2008, 03:21 PM posted to microsoft.public.excel.misc
VRaybandb
external usenet poster
 
Posts: 3
Default deleting blank rorws

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,
--
VRaybandb


"Gord Dibben" wrote:

Select column A then F5SpecialBlanks.

EditDeleteEntire Row.


Gord Dibben MS Excel MVP

On Tue, 9 Dec 2008 11:25:01 -0800, VRaybandb
wrote:

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.



  #7  
Old December 10th, 2008, 04:58 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default deleting blank rorws

Good to hear.

Thanks for the feedback.


Gord

On Wed, 10 Dec 2008 07:21:01 -0800, VRaybandb
wrote:

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,


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.