+ Reply to Thread
Results 1 to 6 of 6

Remove Blank Lines

  1. #1
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Remove Blank Lines

    Hello,

    I have a massive list of Business names & Addresses.

    like:

    Business Name A
    address 1
    address 2
    Address 3
    postcode
    opening times



    Business Name B
    address 1
    etc
    etc


    Between each company, there is 3 blank rows.
    How can I remove 2 of the blank rows and just leave 1

    I started doing it manually, but there is over 14000 rows...

    please help.



    Thanks
    Last edited by NBVC; 08-16-2010 at 12:56 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove Blank Lines

    Assuming data is in column A, starting at A2, then add column with formula:

    =AND(A2="",A3<>"")

    copied down all the way.

    Then apply Autofilter (Data|Filter|Autofilter) to the table and filter For TRUE.

    Delete those Rows and remove the Autofilter.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Remove Blank Lines

    Hello,

    I tried the above, but it only puts TRUE on 1 of the blank rows. There is 3 blank rows and I want to leave only 1.

    your method is resulting in:

    A2 business name FALSE
    A3 Address 1 FALSE
    A4 Address 2 FALSE
    A5 Address 3 FALSE
    A6 Postcode FALSE
    A7 Opening time FALSE
    A8 blank FALSE
    A9 blank FALSE
    A10 blank TRUE
    A11 Address 1 FALSE
    A12 Adress 2 FALSE

    etc etc.....

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove Blank Lines

    Sorry, misinterpreted you...

    Try:

    =OR(AND(A3="",A1=""),AND(A2="",A3<>""))

    copied down.

  5. #5
    Forum Contributor
    Join Date
    12-04-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    127

    Re: Remove Blank Lines

    Hi, that worked OK, (sort of) but I managed to get it looking how I want.

    1 more problem you could kindly help me with?

    say the business name is: ABC products ltd

    in the text string it actually says: ABC Products ltd (34 miles)

    I retrieved this info from a closest dealer search on the internet.

    How would I remove the (34 miles) bit from each company name?



    ?


    thankyou again.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove Blank Lines

    As this is not a question related to the original question directly, you need to start a new thread please.

+ 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