+ Reply to Thread
Results 1 to 5 of 5

How do I find and Replace multiple line breaks with a single line break?

  1. #1
    Registered User
    Join Date
    10-21-2020
    Location
    United States
    MS-Off Ver
    Office 16
    Posts
    7

    Post How do I find and Replace multiple line breaks with a single line break?

    How do I find and Replace x3 line breaks with x1 line break?
    The text in between the bold asterisks is what I need help with.

    *
    "Size & Color Options" "Select" " " "Light - Small" "Light - Medium" "Light - Large" "Light - X-Large" "Light - 2X-Large" "Light - 3X-Large" " " " Dark - Medium" " Dark - Large" " Dark - X-Large" " Dark - 2X-Large" " Dark - 3X-Large" " " "Black - Small" "Black - Medium" "Black - Large" "Black - X-Large" "Black - 3X-Large"



    "Text Underneath Insignia?" "No Thanks" "Yes(+6.00)"

    "Text Underneath Insignia?=Yes(+6.00)" "Enter Text" Inscription 20 Required
    *



    EDIT: I do have Kutools, if that helps.



    SOLVED:
    Find and Replace "CTRL+J" with "<b>",
    then find and replace however many "<b>" that you need until there are just 1 "<b>" per line break,
    then find and replace "<b>" with "CTRL+J & CTRL+J"
    you now have x1 line break where there were multiple.
    Last edited by PatricMiller; 10-22-2020 at 10:53 AM. Reason: added more info

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: How do I find and Replace multiple line breaks with a single line break?

    just because you have kuTools doesn't mean anything. no software vendor can possibly cover all the confusion and formatting errors that take place in a world where 5 million software platforms exist, and every company is buying different ones. I'm guessing you are dealing with vendors or management that just throws files at you and doesn't care about the cross-platform formatting errors because they have no clue what's going on, nor do they care?

    regardless, can you clarify your words below?
    How do I find and replace x3 LB's with x1 LB's
    what do ''x1'' and ''x3'' mean?

    https://www.extendoffice.com/product...for-excel.html

  3. #3
    Registered User
    Join Date
    10-21-2020
    Location
    United States
    MS-Off Ver
    Office 16
    Posts
    7

    Re: How do I find and Replace multiple line breaks with a single line break?

    The "x1 Line Break" meant one line break, and the "x3 Line Breaks" meant three line breaks.

    There are multiple line breaks scattered throughout the sheet, such as 2 or 3 and sometimes even 4 line breaks. I'm trying the replace all the lines breaks per cell, if the cell contains more than 1 line break in a row (for example: "Text" LB, LB, LB, "Text"), with a single line break (for example: "Text", LB, LB, LB, "Text" into "Text", LB, "Text").

    Find and Replace Multiple Line Breaks with a Single Line Break.

    I hope this is what you needed.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: How do I find and Replace multiple line breaks with a single line break?

    hmmmmm, well that might be tough, Pat. I have tested it, and this is what I found:

    => nothing works in the find/replace feature in the interface. I tried everything I could think of, including all possible ASCII numbers.
    => when running a check on the cells that are similar to yours, with this code:
    Please Login or Register  to view this content.
    it seems as though breaks only come in one form, unless the text inside the cells were pasted in or imported from another formatted program, written in other languages and/or platforms. see these images. looks like you have to use code, I suppose:

    https://docs.microsoft.com/en-us/off...p/chr-function

    https://docs.microsoft.com/en-us/off...acter-set-0127

    https://docs.microsoft.com/en-us/off...ter-set-128255
    Attached Images Attached Images
    Last edited by vba_php; 10-21-2020 at 07:01 PM.

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,969

    Re: How do I find and Replace multiple line breaks with a single line break?

    If your test is in A1, say, you could enter this formula in cell A3, say. NOTE: it's important that cell A3 is formatted as "Wrap Text" or it won't work:

    =LEFT(A1,SEARCH(CHAR(10),A1)-1)&CHAR(10)&RIGHT(A1,LEN(A1)-SEARCH(CHAR(10),A1)-(LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))-1))
    Attached Files Attached Files

+ 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] Power Query - Find and Replace Line Breaks
    By ibuhary in forum Excel General
    Replies: 4
    Last Post: 03-27-2018, 05:33 AM
  2. Find Description field and remove multiple line breaks
    By bcn1988 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2015, 03:34 PM
  3. Replies: 7
    Last Post: 08-06-2014, 08:47 AM
  4. Replies: 8
    Last Post: 07-14-2014, 03:07 AM
  5. Replies: 0
    Last Post: 02-19-2014, 03:49 PM
  6. Find/Replace with Manual Line Break
    By rkohlman in forum Excel General
    Replies: 1
    Last Post: 12-19-2006, 02:25 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