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(quot;A:Rquot;).Select
Selection.Copy
Sheets(quot;RowsDeletedquot;).Select
Range(quot;A1quot;).Select
ActiveSheet.Paste
Columns(quot;E:Equot;).Select
On Error Resume Next
Selection.SpecialCells(xlCellTypeBlanks).EntireRow .Delete
ActiveSheet.UsedRange
End SubThe 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: www.excelforum.com/member.php...oamp;userid=34074
View this thread: www.excelforum.com/showthread...hreadid=538376Within your macro you could set up a filter on column E, choose the
criteria, then Edit | Delete Row and remove the filter. You could
record a macro while you do this manually (to get the syntax), then
copy it over to your other macro.
Hope this helps.
Pete
- Apr 21 Sat 2007 20:37
Delete empty rows with cell type 2
close
全站熱搜
留言列表
發表留言