+ Reply to Thread
Results 1 to 4 of 4

Find Description field and remove multiple line breaks

  1. #1
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Find Description field and remove multiple line breaks

    Hello!

    I have an interesting scenario. There is a column named "Description" which can show up in any column. Within the "Description" field, each cell contains several lines of text. There are instances where there are several blank lines that I would like to remove so there is only one blank line. For Example, consider the following text:


    "I want to remove 1 of the 2 blank lines below


    so that the text appears normally"


    One of the requirements is if there is only 1 blank line, then that is okay. Only remove blank lines that aren't needed and replace it with 1 blank line. So...

    IF "count of lines" > 1 then "trim so only 1 blank line is present" else "leave alone"

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Find Description field and remove multiple line breaks

    There is a column named "Description"
    Is it a named range, or is that what it says in row 1 of that column?

    there are several blank lines
    how are the blank lines created? Paragraph marks, carriage return, something else?
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Contributor
    Join Date
    08-17-2012
    Location
    Richmond, VA
    MS-Off Ver
    Excel 2007
    Posts
    158

    Re: Find Description field and remove multiple line breaks

    Thanks for the reply walruseggman!

    It is not a named range but that is the field name in row 1 (somewhere in row 1). The blank lines are chr(10)

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

    Re: Find Description field and remove multiple line breaks

    Try
    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. Code that will find and group data together within multiple columns, insert line breaks __
    By onelineatatime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2015, 06:10 AM
  2. Replies: 8
    Last Post: 07-14-2014, 03:07 AM
  3. Replies: 1
    Last Post: 03-18-2014, 06:57 PM
  4. [SOLVED] Sum the value of multiple cells off the description field
    By ory182003 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-18-2013, 08:38 PM
  5. Remove Certain Line Breaks in cell
    By hollyc2424 in forum Excel General
    Replies: 1
    Last Post: 05-18-2011, 01:47 PM
  6. Remove Line Breaks ALT + ENTER
    By Highman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-26-2005, 05:06 PM
  7. Adding line breaks by using find and replace
    By soozie in forum Excel General
    Replies: 3
    Last Post: 03-06-2005, 08:06 PM

Tags for this Thread

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