+ Reply to Thread
Results 1 to 5 of 5

Split cell text

  1. #1
    Forum Contributor
    Join Date
    09-28-2019
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    147

    Split cell text

    Hello

    I have a database to process and there are values on same cell (separate with / or | ) i need to split cell into name cell and surname cell

    Please check file attach
    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,222

    Re: Split cell text

    Please try at B2
    =TRIM(MID(SUBSTITUTE(TRIM(MID(SUBSTITUTE(SUBSTITUTE($A2,"/","|"),"|",REPT(" ",99)),CEILING(COLUMNS($B2:B2)/2,1)*99-98,99))," ",REPT(" ",99)),MOD(COLUMNS($B2:B2)-1,2)*99+1,99))
    Attached Files Attached Files

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,199

    Re: Split cell text

    A little shorter, in B2 copied across and down:

    =TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($A2," | "," ")," / "," ")," ",REPT(" ",99)),(99*COLUMNS($B2:B2))-98,99))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Contributor
    Join Date
    09-28-2019
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    147
    Quote Originally Posted by Bo_Ry View Post
    Please try at B2
    =TRIM(MID(SUBSTITUTE(TRIM(MID(SUBSTITUTE(SUBSTITUTE($A2,"/","|"),"|",REPT(" ",99)),CEILING(COLUMNS($B2:B2)/2,1)*99-98,99))," ",REPT(" ",99)),MOD(COLUMNS($B2:B2)-1,2)*99+1,99))
    Yours seem to work pretty fine. Separates 1st 2nd 3rd and surname
    Thank you very much

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,199

    Re: Split cell text

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] Text in a Split Cell
    By Pete291 in forum Excel General
    Replies: 4
    Last Post: 12-02-2016, 12:36 PM
  2. Replies: 4
    Last Post: 11-11-2015, 03:00 PM
  3. [SOLVED] Split out text and No. from a Cell
    By BigDawg15 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-10-2014, 06:34 PM
  4. [SOLVED] Split Text from cell
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-01-2014, 01:27 PM
  5. [SOLVED] Split text in a cell
    By dougmorgan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-23-2013, 12:48 PM
  6. Split text in a cell
    By Ohio River Greg in forum Excel General
    Replies: 2
    Last Post: 10-03-2011, 03:44 PM
  7. split text from one cell
    By duda in forum Excel General
    Replies: 5
    Last Post: 01-17-2011, 04:40 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