LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Two column deletion


How can i put these 2 sub into 1 ?
Currently to speed up deletion i sort accordingly like

Sort by column(12)
Run DelPost
Sort by column(11)
Run DelPre.
---------------------------------

Sub DelPost()
On Error Resume Next
With ActiveSheet.Columns(12)
.ColumnWidth = 20
.Replace _
What:="Post", _
Replacement:="#N/A", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
.SpecialCells(xlConstants, xlErrors).EntireRow.Delete
End With
End Sub

Sub DelPre()
On Error Resume Next
With ActiveSheet.Columns(11)
.Replace _
What:="Pre", _
Replacement:="#N/A", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
.SpecialCells(xlConstants, xlErrors).EntireRow.Delete
End With
End Sub

Thank you in advance.
 
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
Selective Deletion within a column Colin Hayes Excel Worksheet Functions 8 September 10th 06 03:27 AM
Deletion of rows in a column according to a given criteria Nuno Excel Programming 3 February 23rd 06 10:57 PM
Selective Column deletion mattrane Excel Discussion (Misc queries) 4 December 25th 05 02:01 AM
Selective Column deletion mattrane Excel Discussion (Misc queries) 0 December 24th 05 09:47 PM
DELETION OF TRIANGLES FROM COMPLETE COLUMN MEANLEANDEANE Excel Discussion (Misc queries) 3 December 20th 05 03:47 PM


All times are GMT +1. The time now is 02:04 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"