Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks also. This works just as well as the previous suggestion.
Problem solved! "JLGWhiz" wrote: This should work: Sub delSixUp() Dim lastRow As Long, i As Long lastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row For i = lastRow To 2 Step -1 If Len(Trim(ActiveSheet.Cells(i, 1).Value)) 5 Then Cells(i, 1).EntireRow.Delete End If Next End Sub "Ken G" wrote in message ... I need a macro to search through a sheet of approximately 5,000 rows and delete any row where the length of the string in column A is greater than 5. I'm using Excel 2003. Can anyone help? . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with macro to delete rows | Excel Programming | |||
Macro to delete 2 rows every 500 rows | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
HOW TO: Delete Rows with a Macro | Excel Programming |