+ Reply to Thread
Results 1 to 9 of 9

Eliminate extra lines within cell

  1. #1
    Registered User
    Join Date
    05-27-2015
    Location
    Minnesota
    MS-Off Ver
    2010
    Posts
    19

    Eliminate extra lines within cell

    Within one column (F) cells, I have information containing HTML coding such as html, body, div align, etc.

    I got rid of those by Finding <*> and replacing with nothing.

    However, now within the cells, there are unnecessary lines which need to be removed.

    Cell F2 contains the following:
    [blank line]
    Text 1,2,3,4
    [blank line]
    Text 5,6,7,8
    [blank line]
    [blank line]
    [blank line]

    What I want to fix is to eliminate the blank lines at the beginning and end of the cell information:
    Text 1,2,3,4
    [blank line]
    Text 5,6,7,8

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,006

    Re: Eliminate extra lines within cell

    So this is all withing 1 cell - or across multiple cells?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-27-2015
    Location
    Minnesota
    MS-Off Ver
    2010
    Posts
    19

    Re: Eliminate extra lines within cell

    Quote Originally Posted by FDibbins View Post
    So this is all withing 1 cell - or across multiple cells?
    This is all within 1 cell. Each cell in this column includes information such as the example I provided above.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,006

    Re: Eliminate extra lines within cell

    Try a Find/Replace for Char 10

  5. #5
    Registered User
    Join Date
    05-27-2015
    Location
    Minnesota
    MS-Off Ver
    2010
    Posts
    19

    Re: Eliminate extra lines within cell

    Quote Originally Posted by FDibbins View Post
    Try a Find/Replace for Char 10
    Won't that eliminate the extra line between my texts as well? I only want to remove the Char 10 at the beginning and end of the text in the cell

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,006

    Re: Eliminate extra lines within cell

    hmm yes it will. You could try SUBSTITUTE() in a helper cell?

  7. #7
    Registered User
    Join Date
    05-27-2015
    Location
    Minnesota
    MS-Off Ver
    2010
    Posts
    19

    Re: Eliminate extra lines within cell

    I used
    Please Login or Register  to view this content.
    However, this also removed the space between my texts. Maybe I am setting up the formula incorrectly?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,006

    Re: Eliminate extra lines within cell

    No, you need to specify which CHAR number to remove

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

    Re: Eliminate extra lines within cell

    Quote Originally Posted by shre0047 View Post
    Within one column (F) cells, I have information containing HTML coding such as html, body, div align, etc.

    I got rid of those by Finding <*> and replacing with nothing.

    However, now within the cells, there are unnecessary lines which need to be removed.

    Cell F2 contains the following:
    [blank line]
    Text 1,2,3,4
    [blank line]
    Text 5,6,7,8
    [blank line]
    [blank line]
    [blank line]

    What I want to fix is to eliminate the blank lines at the beginning and end of the cell information:
    Text 1,2,3,4
    [blank line]
    Text 5,6,7,8
    Select the cell(s) that you want to apply then run the code.
    Please Login or Register  to view this content.

+ 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. Extra lines from textbox's linked cell
    By DreamEyes in forum Excel General
    Replies: 4
    Last Post: 02-11-2016, 08:16 AM
  2. How can I eliminate extra blank pages in the pdf file that my workbook creates?
    By imaquila in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2013, 09:10 PM
  3. How to eliminate duplicate lines within a cell
    By kgraham2 in forum Excel General
    Replies: 5
    Last Post: 10-19-2012, 04:56 AM
  4. need to eliminate blank lines in VLOOKUP results
    By lisach in forum Excel General
    Replies: 3
    Last Post: 03-02-2012, 08:05 AM
  5. Copying record sets to eliminate blank lines
    By EdMac in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-30-2007, 09:57 AM
  6. Macro to eliminate extra space
    By kleivakat in forum Excel General
    Replies: 3
    Last Post: 01-31-2006, 08:25 AM
  7. Replies: 4
    Last Post: 04-15-2005, 07:07 PM

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