Formula to Extract Text (instead of using Text to Columns)

seenai

Board Regular
Joined
Mar 31, 2013
Messages
54
Hi,

I need an excel formula to extract the text between characters "_" (underscore)

Eg in Cell A1 : IN18059850_Plant_T0_1218_New Failure

I need Column B1, C1, D1, E1, F1 to extract the text between '_'

Help me to get the data.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
with PowerQuery (Get&Transform)

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Column1.1", "Column1.2", "Column1.3", "Column1.4", "Column1.5"})
in
    Split[/SIZE]

Column1Column1.1Column1.2Column1.3Column1.4Column1.5
IN18059850_Plant_T0_1218_New FailureIN18059850PlantT01218New Failure
 
Upvote 0
Try:

ABCDEF
1IN18059850_Plant_T0_1218_New FailureIN18059850PlantT01218New Failure

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",999)),COLUMNS($B1:B1)*999-998,999))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Put the following formula in B1 and copy to the right

=TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",99)),IF(COLUMN()=2,1,99*(COLUMN()-2)),50))
 
Upvote 0
hI,

Thank you very much for your solution.

B.Srinivasa Rao

Try:

ABCDEF
1IN18059850_Plant_T0_1218_New FailureIN18059850PlantT01218New Failure

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=TRIM(MID(SUBSTITUTE($A1,"_",REPT(" ",999)),COLUMNS($B1:B1)*999-998,999))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,124,996
Members
449,201
Latest member
Lunzwe73

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