Results 1 to 2 of 2

[SOLVED] deleting empty cells

Threaded View

Truss123 [SOLVED] deleting empty cells 02-12-2012, 12:44 PM
Mordred Re: deleting empty cells 02-12-2012, 12:56 PM
  1. #1
    Registered User
    Join Date
    12-27-2011
    Location
    Bothell
    MS-Off Ver
    Excel 2010
    Posts
    5

    [SOLVED] deleting empty cells

    NEVER MIND I FIGURED IT OUT, BUT THANKS ANYWAY.


    I have data with empty cells throughout in a column. My goal is to erase the empty cells in the column with the data without disturbing the other columns and end up with no empty cells in between each piece of data. The problem is that the sub routine bellow is deleting all the cells including the ones with the data.


    Sub erasewe()
    
    For i = 1 To 10000
    If IsEmpty(ActiveCell) Then
    ActiveCell.Delete Shift:=xlUp
    Else
    ActiveCell.Offset(1, 0).Select
    End If
    Next i
    End Sub
    Last edited by Truss123; 02-13-2012 at 01:35 PM.

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