+ Reply to Thread
Results 1 to 5 of 5

Delete Rows w. Multiple Space

Hybrid View

japorms Delete Rows w. Multiple Space 11-16-2009, 12:22 PM
Andy Pope Re: Delete Rows w. Multiple... 11-16-2009, 12:30 PM
japorms Re: Delete Rows w. Multiple... 11-16-2009, 12:40 PM
Andy Pope Re: Delete Rows w. Multiple... 11-16-2009, 12:45 PM
japorms Re: Delete Rows w. Multiple... 11-16-2009, 12:51 PM
  1. #1
    Registered User
    Join Date
    02-26-2004
    Location
    philippines
    Posts
    73

    Re: Delete Rows w. Multiple Space

    Here's a sample
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Delete Rows w. Multiple Space

    try this,

    Sub X()
    
        Dim lngRow As Long
        
        With ActiveSheet
            For lngRow = .Cells(.Rows.Count, 1).End(xlUp).Row To 1 Step -1
                If Len(.Cells(lngRow, 1)) > 0 Then
                    If Len(Trim(Left(.Cells(lngRow, 1), 20))) = 0 Then
                        .Cells(lngRow, 1).EntireRow.Delete
                    End If
                End If
            Next
        End With
            
    End Sub
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1