+ Reply to Thread
Results 1 to 5 of 5

Split text with condition in excel

  1. #1
    Registered User
    Join Date
    09-23-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    47

    Split text with condition in excel

    hi , i have excel sheet i want to split data with condition . here is ex:

    HTML Code: 
    i want to split text if beautiful word in mid or not in starting . if in starting as above in row 2 result would like in cell b . if "beautiful" in mid or any other position then result would like row 1 and row 3 in cell b and cell c . hope you understand my question. thanks

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Split text with condition in excel

    Try

    for the left bit
    =LEFT(A1,SEARCH("beautiful",A1)-1)

    for the right bit
    =SUBSTITUTE(A10,LEFT(A10,SEARCH("beautiful",A10)-1),"")
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Split text with condition in excel

    Try

    for the left bit
    =LEFT(A1,SEARCH("beautiful",A1)-1)

    for the right bit
    =SUBSTITUTE(A10,LEFT(A10,SEARCH("beautiful",A10)-1),"")

  4. #4
    Registered User
    Join Date
    09-23-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    47

    Re: Split text with condition in excel

    thanks its work

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,999

    Re: Split text with condition in excel

    Try

    B1=IF(SEARCH("beautiful",$A1)<=1,$A1,TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",50)),(COLUMNS($B1:B1)-1)*100+1,100)))
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark 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. Replies: 4
    Last Post: 11-11-2015, 03:00 PM
  2. How to split text in a cell with a specified condition
    By amethystfeb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2013, 09:29 AM
  3. split text files stored in some location to multiple files based on a condition
    By GIRISH_KH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2013, 11:32 AM
  4. split date from a text in excel 2010
    By aarif_ziaee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-21-2013, 02:06 AM
  5. How Do I Split Text Based Upon Two Values To Split
    By HowdeeDoodee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2012, 05:05 AM
  6. Split Excel Cell w/o Text-2-Column?
    By benkmann in forum Excel General
    Replies: 13
    Last Post: 05-12-2008, 06:26 AM
  7. split text into more columns excel
    By ibarrera in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2006, 12:00 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