Extracting Value in Excel

jmartin2178

New Member
Joined
Jun 10, 2019
Messages
14
What would be the appropriate formula to extract the text between the 1st and 2nd underscores?


Text: STR_UAT_19.3_MWaaS: MODIFY_EXISTING_INTERFACE - Business processing area is not populating when MFTP-ID is entered.

* Original Value located in Column: F
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Code:
=trim(mid(substitute(a1,"_",rept(" ",100)),100,100))

Another quick question, what if I would like to extract the next value highlighted in Red?


Text: STR_UAT_19.3_ MWaaS : MODIFY_EXISTING_INTERFACE - Business processing area is not populating when MFTP-ID is entered.
 
Upvote 0
How about
=TRIM(MID(SUBSTITUTE(SUBSTITUTE(A2,"_",REPT(" ",100),3),":",REPT(" ",100)),100,100))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
I'm (more than) curious about the use of REPT in this task.
Is there good support for this approach versus the following and, if so, why?

With the original text string in A1

Third _ position in A2

Code:
=FIND(CHAR(160),SUBSTITUTE(A1,"_",CHAR(160),3))

First : position in A3

Code:
=FIND(CHAR(160),SUBSTITUTE(A1,":",CHAR(160),1))

Extraction

Code:
MID(A1,A2+1,A3-A2-1)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top