+ Reply to Thread
Results 1 to 6 of 6

help with code to remove lines

  1. #1
    Forum Contributor
    Join Date
    01-27-2015
    Location
    New hampshire
    MS-Off Ver
    excel 2013
    Posts
    143

    help with code to remove lines

    I have this code that removes all blank lines but I was wondering if there was a way to code this to only delete blank lines if there are more then 1 blank lines.

    so if my text looks like this
    Please Login or Register  to view this content.

    it will look like this after

    Please Login or Register  to view this content.

    this is the code


    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,291

    Re: help with code to remove lines

    Hi Jenkins,

    Try this code instead:

    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    01-27-2015
    Location
    New hampshire
    MS-Off Ver
    excel 2013
    Posts
    143

    Re: help with code to remove lines

    thank you! but this is for data in a text file.

  4. #4
    Forum Contributor
    Join Date
    01-27-2015
    Location
    New hampshire
    MS-Off Ver
    excel 2013
    Posts
    143

    Re: help with code to remove lines

    I got this code to work but when I open the file it leaves a trailing blank line... how can I get it to stop that???

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-27-2015
    Location
    New hampshire
    MS-Off Ver
    excel 2013
    Posts
    143

    Re: help with code to remove lines

    oops


    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: help with code to remove lines

    Please Login or Register  to view this content.
    Also, what happend to this?

    http://www.excelforum.com/excel-prog...ml#post4003899

+ 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. [SOLVED] Macro neede to open text files from folder and remove all the lines except specific lines
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-07-2014, 02:44 AM
  2. Code Help: Remove many lines at once
    By wnstar21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2014, 01:57 PM
  3. code not working - remove repeated lines
    By SillySox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2013, 03:29 AM
  4. How to remove these lines
    By Little Master in forum Excel General
    Replies: 2
    Last Post: 10-23-2008, 06:33 AM
  5. [SOLVED] Should I remove code lines that turn auto calculation off?
    By Ken Johnson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-05-2005, 09:05 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