ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete blank rows (https://www.excelbanter.com/excel-programming/339154-delete-blank-rows.html)

Jim333[_8_]

Delete blank rows
 

Hi everybody,

I have a table contains of more than 500 rows, some of these rows are
filled and the others are blank, what I want is a code to help me
deleting the blank rows without selecting them one by one because it is
a time consuming way.

by the way, the blank rows are not under eachother, they are between
filled rows.

I hope that my question is clear for all,

thank you,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=401766


KL

Delete blank rows
 
Hi Jim,

Have a look at this: http://j-walk.com/ss/excel/tips/tip56.htm

Regards,
KL


"Jim333" wrote in
message ...

Hi everybody,

I have a table contains of more than 500 rows, some of these rows are
filled and the others are blank, what I want is a code to help me
deleting the blank rows without selecting them one by one because it is
a time consuming way.

by the way, the blank rows are not under eachother, they are between
filled rows.

I hope that my question is clear for all,

thank you,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile:
http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=401766




Bruno Campanini[_3_]

Delete blank rows
 
"Jim333" wrote in
message ...

Hi everybody,

I have a table contains of more than 500 rows, some of these rows are
filled and the others are blank, what I want is a code to help me
deleting the blank rows without selecting them one by one because it is
a time consuming way.

by the way, the blank rows are not under eachother, they are between
filled rows.

I hope that my question is clear for all,


This simple single line code you can put in every macro
alphabetically sorts the range ascending,
leaving at the bottom the blank rows:
----------------------------------------
ActiveSheet.[I45:I55].Sort _
Key1:=ActiveSheet.[I45], _
Order1:=xlAscending, _
Orientation:=xlSortColumns, _
MatchCase:=True
------------------------------------------
If you don't want the column alphabetically ordered,
let me know.

Bruno



Norman Jones

Delete blank rows
 
Hi Jim

Assuming that blank rows may be defined by the corresponding column A
value, as an alternative suggestion, try:

'========================
Public Sub Tester02()
On Error Resume Next
Columns("A").SpecialCells(xlBlanks).EntireRow.Dele te
On Error GoTo 0
End Sub
'<<========================


---
Regards,
Norman



"Jim333" wrote in
message ...

Hi everybody,

I have a table contains of more than 500 rows, some of these rows are
filled and the others are blank, what I want is a code to help me
deleting the blank rows without selecting them one by one because it is
a time consuming way.

by the way, the blank rows are not under eachother, they are between
filled rows.

I hope that my question is clear for all,

thank you,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile:
http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=401766




Jim333[_9_]

Delete blank rows
 

Hi

Thank you sooo much .. the code is working very well.

bye,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=401766



All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com