Results 1 to 5 of 5

still have empty cell after run Delete empty cells code

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    still have empty cell after run Delete empty cells code

    I have to run few time to delete all empty cell if Range A5:A20 are empty. Please help me
    Dim lastrow As Long
    Dim iCell As Long
    
    lastrow = Range("A" & Rows.Count).End(xlUp).Row
    
    For iCell = 1 To lastrow
        If Range("A" & iCell) = "" Then
            Range("A" & iCell).Delete Shift:=xlUp
        End If
    Next iCell
    Regards,
    tt3
    Last edited by tuongtu3; 11-25-2012 at 04:28 PM. Reason: Solved

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