• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to remove text and leave the numericals

rAVINDB

New Member
This is the example of text string and the desired output. Can anyone help me.
this is the text string desired output
Production WL P 1201074 - T 01040302 1201074-01040302
FM P 1201071 T 01040302 1201071-01040302
Drilling P 1201248 - T 0102 1201248-0102
P - 1029995 T - 010701 1029995-010701
 
1. find suitable cell to insert formula.
2. Insert this below
=SUBSTITUTE(TRIM(TEXTJOIN("",TRUE,IFERROR(MID(reference cell,ROW(INDIRECT("1:100")),1)+0," ")))," ","-")
3. Hit Ctrl+Shift+Enter
4. Donate to your nearest charity.
 
1. find suitable cell to insert formula.
2. Insert this below
=SUBSTITUTE(TRIM(TEXTJOIN("",TRUE,IFERROR(MID(reference cell,ROW(INDIRECT("1:100")),1)+0," ")))," ","-")
3. Hit Ctrl+Shift+Enter
4. Donate to your nearest charity.
how does TEXTJOIN() work? is this available in any specific version of excel?
 
how does TEXTJOIN() work? is this available in any specific version of excel?
1] TEXTJOIN is a new function, only available in Excel 2016 together with Office 365.

2] If you don't have TEXTJOIN function, try this formula instead.

upload_2018-2-26_23-30-9.png

In B1, copied down :

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("P ",A1)+2,99)," ",),"-",),"T","-")

Regards
Bosco
 
Back
Top