Formula to pull specific characters from a text string into another cell

Mike Lindsey

New Member
Joined
Jul 8, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a 200k row spreadsheet that has information such as (1-1/8" X 1040') or (3/4" X 428') included, I would like to be able to run a lookup that will separate the diameter and the lengths (Diameter X Length) into their own cells, I have tried different methods however I seem to be having problems caused by the inch and feet symbols.
Would someone have an example of a formula that will work?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
If your data is formatted exactly as you are showing then you can try the TEXTBEFORE and TEXTAFTER functions.

Excel Formula:
=TEXTBEFORE(A2," X ")
=TEXTAFTER(A2," X ")

Book1
ABC
1
2(1-1/8" X 1040')1-1/8"1040'
3(3/4" X 428')3/4"428'
Sheet2
Cell Formulas
RangeFormula
B2:B3B2=TEXTAFTER(TEXTBEFORE(A2," X "),"(")
C2:C3C2=TEXTBEFORE(TEXTAFTER(A2," X "),")")


Or

Book1
DE
21-1/8"1040'
Sheet2
Cell Formulas
RangeFormula
D2D2=SUBSTITUTE(TEXTBEFORE(A2," X "),"(","")
E2E2=SUBSTITUTE(TEXTAFTER(A2," X "),")","")
 
Upvote 0
Solution
You can get a spill formula with TEXTSPLIT.
Book1
ABC
1
2(1-1/8" X 1040')1-1/8"1040'
3(3/4" X 428')3/4"428'
Sheet3
Cell Formulas
RangeFormula
B2:C3B2=TEXTSPLIT(A2,{"("," X ",")"},,1)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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