+ Reply to Thread
Results 1 to 5 of 5

Insert a line break within a cell after a specific character

  1. #1
    Registered User
    Join Date
    01-20-2020
    Location
    Wroclaw
    MS-Off Ver
    Excel 2013
    Posts
    18

    Insert a line break within a cell after a specific character

    Hi everyone,

    is it possible to use a formula in order to go to a new line (like when you press ALT+ENTER) after a specific character?

    For instance, in the file I've attached I would like to insert a new line within cell B3 after every comma or question mark. The final result should look like B10.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Insert a line break within a cell after a specific character

    Please try
    =SUBSTITUTE(SUBSTITUTE(B3,", ",","&CHAR(10)),"? ","?"&CHAR(10))
    Attached Files Attached Files

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Insert a line break within a cell after a specific character

    Unclear where you want the fix to be.

    sheets event code revision would be
    Please Login or Register  to view this content.
    or using a formula

    =SUBSTITUTE(B3,CHAR(9),CHAR(10))
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Insert a line break within a cell after a specific character

    A
    B
    C
    3
    Click to see pop up message Please provide answers to the following questions, 1.What is your name? 2. Where are you from? 3. How old are you? 4. What language do you speak? Please provide answers to the following questions,
    1.What is your name?
    2. Where are you from?
    3. How old are you?
    4. What language do you speak?



    A
    B
    C
    3
    Click to see pop up message Please provide answers to the following questions, 1.What is your name? 2. Where are you from? 3. How old are you? 4. What language do you speak? =SUBSTITUTE(SUBSTITUTE(B3,",",","&CHAR(10)),"?","?"&CHAR(10))
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  5. #5
    Registered User
    Join Date
    01-20-2020
    Location
    Wroclaw
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Insert a line break within a cell after a specific character

    Thank you all, all the formulas suggested work fine.

+ 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] VBA macro to to INSERT Alt-Enter line break in Cell
    By GregM56 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2019, 10:41 AM
  2. [SOLVED] Insert a Line Break in a Cell
    By mgraf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2018, 04:43 PM
  3. [SOLVED] VBA code to insert line break within a cell if specific criteria is met.
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2018, 09:28 AM
  4. Replies: 12
    Last Post: 06-22-2016, 01:11 PM
  5. Unicode character creates a line break
    By mikke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2015, 08:48 PM
  6. Excel new line in cell after specific character
    By johan12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2014, 11:26 AM
  7. Macro Add line break after character
    By Tybalt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2013, 09:08 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