Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jim jim is offline
external usenet poster
 
Posts: 19
Default Macro to delete blank rows

I have text in Column A1:A2000 that has lots of blank rows
that I need deleted. I would like to compact all the data
so I don't have to scroll down so far.

Thanks
Jim

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to delete blank rows

sub DeleteRealBlanks()
On Error Resume Next
Range("A1:A2000").SpecialCells(xlBlanks).EntireRow .delete
On Error goto 0
End Sub

--
Regards,
Tom Ogilvy

"Jim" wrote in message
...
I have text in Column A1:A2000 that has lots of blank rows
that I need deleted. I would like to compact all the data
so I don't have to scroll down so far.

Thanks
Jim



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Macro to delete blank rows

See Ron de Bruin's answer at:
http://groups.google.com/groups?q=de...n&lr=&ie=UT F
-8&c2coff=1&selm=OYezTxiUDHA.2040%40TK2MSFTNGP11.ph x.gbl&rnum=3
Jorge
"Jim" escreveu na mensagem
...
I have text in Column A1:A2000 that has lots of blank rows
that I need deleted. I would like to compact all the data
so I don't have to scroll down so far.

Thanks
Jim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro to delete blank rows

Hi Jim

On Error Resume Next 'In case there are no blank rows
Range("A1:A2000").SpecialCells(xlCellTypeBlanks).E ntireRow.Delete
On Error GoTo 0

If you do this for a whole column be carfull with the SpecialCells limit
http://support.microsoft.com/default...b;en-us;832293

David have a example om his site to avoid problems
http://www.mvps.org/dmcritchie/excel/delempty.htm

The sub is named del_COLA_empty()


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim" wrote in message ...
I have text in Column A1:A2000 that has lots of blank rows
that I need deleted. I would like to compact all the data
so I don't have to scroll down so far.

Thanks
Jim



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Macro to delete blank rows

Hi
see:
http://www.xldynamic.com/source/xld.Deleting.html

--
Regards
Frank Kabel
Frankfurt, Germany

"Jim" schrieb im Newsbeitrag
...
I have text in Column A1:A2000 that has lots of blank rows
that I need deleted. I would like to compact all the data
so I don't have to scroll down so far.

Thanks
Jim




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
macro to delete rows if cell blank in column puiuluipui Excel Discussion (Misc queries) 4 October 15th 09 05:22 PM
Macro to delete blank rows in a data range Youlan Excel Discussion (Misc queries) 5 September 17th 08 08:51 AM
Delete blank rows Macro Richard Excel Discussion (Misc queries) 3 November 4th 05 08:02 AM
Macro to look for blank rows in sheet, delete the row and autofit JDerm Excel Programming 1 May 13th 04 07:08 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM


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

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

About Us

"It's about Microsoft Excel"