Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am Mon, 3 Dec 2012 04:43:00 +0000 schrieb ixara: Original data ------------ ColA ColB ColC Item Code Duration 1 DE123 0-3 2 PK987 7-10 3 BG313 10-13 4 JJ123 5-7 5 AW100 12-15 Expected result --------------- ColA ColB ColC Item Code Duration 1 DE123 0-3 2 PK987 7-10 4 JJ123 5-7 try: Sub Test() Dim LRow As Long Dim i As Long Dim intSearch As Integer Application.ScreenUpdating = False LRow = Cells(Rows.Count, 1).End(xlUp).Row For i = LRow To 2 Step -1 With Cells(i, 3) intSearch = CInt(Left(.Text, InStr(.Text, "-") - 1)) If intSearch = 10 Then Rows(i).Delete End If End With Next Application.ScreenUpdating = True End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a macro to delete cells from any row | Excel Programming | |||
Filter and Delete all rows with a date greater than or = today | Excel Programming | |||
macro to select cells containing specific text and delete all cells but these | Excel Programming | |||
Delete Rows with Value greater than X | Excel Programming | |||
Macro if greater than letter then delete | Excel Programming |