Extracting data from a cell

jhinkel

New Member
Joined
Jul 20, 2018
Messages
6
I have several thousand records where QBs combines a product SKU followed by the description in brackets. I need the SKU number only which varies in length. In the examples below I simply need the characters leading up to the open parenthesis less the space(s) between the SKU and description. I suspect this is relatively easy, but I don't know Excel well enough to create the formula.

[TABLE="width: 592"]
<colgroup><col></colgroup><tbody>[TR]
[TD]1005T-BKWH (Hooey, Cody Ohl Black / White Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BL ( "Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA)[/TD]
[/TR]
[TR]
[TD]1005T-BLGY (Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BUGY (Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA)[/TD]
[/TR]
</tbody>[/TABLE]
 
I'm back...

Now I need to extract the verbiage between the brackets...anybody have any ideas?

[TABLE="class: cms_table, width: 592"]
<tbody style="border-collapse: collapse; border-spacing: 0px 0px; font-size: 13px; margin-bottom: 0px;">[TR]
[TD]1005T-BKWH (Hooey, Cody Ohl Black / White Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BL ( "Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA)[/TD]
[/TR]
[TR]
[TD]1005T-BLGY (Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BUGY (Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA)[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Would there be anything After the closing bracket ")" ??
 
Upvote 0
I'm back...

Now I need to extract the verbiage between the brackets...anybody have any ideas?

[TABLE="class: cms_table, width: 592"]
<tbody style="border-collapse: collapse; border-spacing: 0px 0px; font-size: 13px; margin-bottom: 0px;">[TR]
[TD]1005T-BKWH (Hooey, Cody Ohl Black / White Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BL ( "Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA)[/TD]
[/TR]
[TR]
[TD]1005T-BLGY (Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA)[/TD]
[/TR]
[TR]
[TD]1005T-BUGY (Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA)[/TD]
[/TR]
</tbody>[/TABLE]
Give this formula a try...

=REPLACE(LEFT(A1,LEN(A1)-1),1,FIND("(",A1),"")
 
Upvote 0
Another way:


Book1
AB
11005T-BKWH (Hooey, Cody Ohl Black / White Trucker Cap - OSFA)Hooey, Cody Ohl Black / White Trucker Cap - OSFA
21005T-BL ( "Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA)"Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA
31005T-BLGY (Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA)Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA
41005T-BUGY (Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA)Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA
Sheet258
Cell Formulas
RangeFormula
B1=TRIM(SUBSTITUTE(MID(A1,FIND("(",A1)+1,255),")",""))


Edit: Added TRIM for possible leading space after extraction (2nd sample)
 
Last edited:
Upvote 0
Sorry I missed your first question, but, as you state, the trim addressed this possibility. This worked as well...thanks!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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