LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
FrankNL
 
Posts: n/a
Default Delete empty rows with cell type 2


I'm using the following macro to copy the columns A:R to a new sheet. In
this new sheet the empty rows are deleted. These rows are determined by
any empty cells in column E.

Sub copypaste()

Columns("A:R").Select
Selection.Copy
Sheets("RowsDeleted").Select
Range("A1").Select
ActiveSheet.Paste

Columns("E:E").Select

On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).EntireRow .Delete
ActiveSheet.UsedRange

End Sub


The problem I'm having is that it only deletes the rows where the cell
in column E is a number (cell type 1), but I want it to also remove the
empty cells with cell type 2 (text).

I tried to use other columns but the have the same problem.

Does anybody have a solution?

thanks


--
FrankNL
------------------------------------------------------------------------
FrankNL's Profile: http://www.excelforum.com/member.php...o&userid=34074
View this thread: http://www.excelforum.com/showthread...hreadid=538376

 
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
How do I conditionally delete rows based on cell contents? John Chan Excel Worksheet Functions 3 May 17th 23 03:45 AM
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


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

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"