+ Reply to Thread
Results 1 to 15 of 15

How do I remove blank lines in the first column.

Hybrid View

SWMagic How do I remove blank lines... 07-15-2013, 05:11 PM
tigeravatar Re: How do I remove blank... 07-15-2013, 05:17 PM
TMS Re: How do I remove blank... 07-15-2013, 05:24 PM
SWMagic Re: How do I remove blank... 07-15-2013, 06:59 PM
jaslake Re: How do I remove blank... 07-15-2013, 07:29 PM
TMS Re: How do I remove blank... 07-15-2013, 07:20 PM
SWMagic Re: How do I remove blank... 07-19-2013, 12:07 AM
TMS Re: How do I remove blank... 07-19-2013, 01:47 AM
SWMagic Re: How do I remove blank... 07-27-2013, 09:59 AM
jeffreybrown Re: How do I remove blank... 07-27-2013, 10:16 AM
Andy Pope Re: How do I remove blank... 07-27-2013, 10:46 AM
SWMagic Re: How do I remove blank... 07-27-2013, 02:05 PM
jaslake Re: How do I remove blank... 07-27-2013, 05:13 PM
JOHN H. DAVIS Re: How do I remove blank... 07-29-2013, 05:14 AM
Andy Pope Re: How do I remove blank... 07-29-2013, 03:19 AM
  1. #1
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,069

    Re: How do I remove blank lines in the first column.

    Yep, no data, no code, nothing.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  2. #2
    Registered User
    Join Date
    08-25-2005
    Posts
    37

    Re: How do I remove blank lines in the first column.

    OK, don't know...I'll try againtest2.xlsm

    The file is 8.98kb. as an excel test2.xlsm file

    Here's the macro:

    Sub test1()
    Dim Rng As Range, ix As Long
    Set Rng = Intersect(Range("A1:A438"), ActiveSheet.UsedRange)
    For ix = Rng.Count To 1 Step -1
        If Rng.Item(ix).Text = Empty Then
            Rng.Item(ix).EntireRow.Delete
        End If
    Next
    End Sub
    Last edited by jeffreybrown; 07-27-2013 at 10:16 AM.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How do I remove blank lines in the first column.

    Hi SWMagic

    Please insert Code Tags around your Code in Post #4 then try this
    Option Explicit
    
    Sub DeleteMe()
        Dim LR As Long
        Dim ws As Worksheet
        Set ws = Sheets("Sheet1")
        With ws
            .Range("A1").EntireRow.Insert
            .Range("A1").Value = "X"
    
            LR = .Range("A" & .Rows.Count).End(xlUp).Row
            .AutoFilterMode = False
            .Range("A1:A" & LR).AutoFilter Field:=1, Criteria1:="="
            .Range("A2:A" & LR).EntireRow.Delete
            .AutoFilterMode = False
            .Range("A1").EntireRow.Delete
        End With
    End Sub
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create List and remove blank Lines
    By jamjam200 in forum Excel General
    Replies: 0
    Last Post: 01-22-2013, 12:30 PM
  2. Remove Blank Lines
    By Robotacha2010 in forum Excel General
    Replies: 5
    Last Post: 08-16-2010, 11:59 AM
  3. Remove lines without a value in column M?
    By Claude-Smith in forum Excel General
    Replies: 4
    Last Post: 09-05-2007, 09:51 AM
  4. [SOLVED] Remove Blank Lines
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2005, 11:00 AM
  5. [SOLVED] remove blank lines from an entire spreadsheet
    By mdeanda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-21-2005, 09:06 AM

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