Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete blank rows JakeShipley2008 Excel Discussion (Misc queries) 2 October 30th 08 02:18 AM
Delete all blank rows... bourbon84 Excel Discussion (Misc queries) 2 October 4th 06 02:13 PM
delete blank rows Pam C Excel Discussion (Misc queries) 1 January 17th 06 07:13 PM
Delete blank row only if 2 consecutive blank rows Amy Excel Programming 2 October 21st 04 05:24 PM
help delete blank rows Cletus Stripling Excel Programming 5 July 25th 03 08:47 PM


All times are GMT +1. The time now is 10:10 PM.

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

About Us

"It's about Microsoft Excel"