+ Reply to Thread
Results 1 to 18 of 18

Text stripper with 2 more tuning

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Text stripper with 2 more tuning

    I have this on b

    CL-0497 (002-01) # 2950/ 2850
    CL - 0518 #2950
    CL 0766 # 2250

    I have this results on C

    CL497(0021)
    CL518
    CL0766

    My formula is

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    the actual result I need is

    CL497
    CL518
    CL766

    I want a two more requirements , I want the formula to destroy brackets and then I want it to insert - sign after where not there example on

    CL 0766 # 2250

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Text stripper with 2 more tuning

    Then What is you requirement ?????

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Text stripper with 2 more tuning

    Try

    C1=TRIM(SUBSTITUTE(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LEFT(B1,SEARCH("#",B1)-2)," ",""),"-0",""),"(",REPT(" ",255)),50),"0",""))
    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)

  5. #5
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    It not takes care of the follow

    CM-0070 (84494-EB4)LIT #12900
    CM-0105 (702873) LIT#12900
    CM-0106 (PWC84599-BFO) INTRUDER #12900
    CM - 0111 (P705962) YORKTOWN #12900
    CM-0118 (708559) PORTER #13400
    CM- 0122 (P708025)HOLTON ST #15900
    CM-0126 (705170) #84/12900
    CM-0127 (705169)YORKTOWN #119/12900

    Results expected

    CM106
    CM111
    CM118
    CM122
    CM126
    CM127

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Text stripper with 2 more tuning

    For this CM-0070 (84494-EB4)LIT #12900

    Result :- CM0070 or CM7

    Pls confirm??

  7. #7
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    Result need be CM007

    I think use of helper may be required

    First to get the - sign
    Then to destroy brackets and words before # sign

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Text stripper with 2 more tuning

    Try

    =LEFT(TRIM(SUBSTITUTE((LEFT(A1,FIND("(",A1)-1)),"-","")),2)&(RIGHT(TRIM(SUBSTITUTE((LEFT(A1,FIND("(",A1)-1)),"-","")),3))

  9. #9
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Text stripper with 2 more tuning

    Or this:

    =REPLACE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,MID(A2,FIND("(",A2),99),""),"-","")," ",""),3,1,"")

    Regards,
    Khalid

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Text stripper with 2 more tuning

    Better ..

    =TRIM(SUBSTITUTE(SUBSTITUTE(LEFT(A1,FIND("(",A1)-1)," ",""),"-0",""))

  11. #11
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Text stripper with 2 more tuning

    attach a sample excel file with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  12. #12
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Text stripper with 2 more tuning

    Nice John Topley

    Even shorter version of my formula # 9:
    =REPLACE(SUBSTITUTE(REPLACE(A2,FIND("(",A2),99,"")," ",""),3,2,"")

    Regards,

  13. #13
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    Thank you all , I will use two formula , my original , and one that I got here

  14. #14
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    Cm-0070 (84494-eb4)lit #12900
    cm-0105 (702873) lit#12900
    cm-0106 (pwc84599-bfo) intruder #12900
    cm - 0111 (p705962) yorktown #12900
    cm-0118 (708559) porter #13400
    cm- 0122 (p708025)holton st #15900
    cm-0126 (705170) #84/12900
    cm-0127 (705169)yorktown #119/12900
    cm - 0128 #8400

  15. #15
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    I want to combine the given formula with what I got here

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    If the text has brackets to use
    =REPLACE(SUBSTITUTE(REPLACE(A2,FIND("(",A2),99,"")," ",""),3,2,"")
    Otherwise
    =SUBSTITUTE(SUBSTITUTE(LEFT(A2,SEARCH("#",A2)-1)," ",""),"-0","")

    If it does correctly it should convert these

    cm-0126 (705170) #84/12900
    cm-0127 (705169)yorktown #119/12900
    cm - 0128 #8400

    to

    CM126
    CM127
    CM128

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Text stripper with 2 more tuning

    Try

    =TRIM(LEFT((SUBSTITUTE(SUBSTITUTE(A1," ",""),"-0","")),5))

  18. #18
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Text stripper with 2 more tuning

    Thanks it takes cares of both criteria , ha ha ha , you made my day

+ 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. VBA Performance Tuning on Formulas - Help!
    By excelrabbit in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2015, 12:15 AM
  2. Censor bot bot needs de-tuning...
    By dredwolf in forum Suggestions for Improvement
    Replies: 20
    Last Post: 03-15-2014, 03:30 PM
  3. [SOLVED] Need help fine tuning a macro
    By jaimeteele in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-27-2013, 04:43 PM
  4. Tuning the precision on a trendline
    By Xmosis in forum Excel General
    Replies: 3
    Last Post: 02-09-2011, 10:31 AM
  5. Macro tuning
    By lauren_wing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2010, 10:47 AM
  6. Fine-tuning VBA code
    By smurray444 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2007, 11:49 AM
  7. [SOLVED] help w/ fine tuning
    By Mike in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-19-2005, 04:05 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