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]
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Perhaps this:

=LEFT(A2,FIND("(",A2)-2)

That is if the sample data you provided is an accurate representation of all your data.. if not, then you may need something else. And welcome to the board.
 
Upvote 0
Here is another formula that will also work...

=REPLACE(A2,FIND(" (",A2),999,"")
 
Upvote 0
There doesn't appear to be a space in the SKU, so you probably could just look for the first space:

=LEFT(A1,FIND(" ",A1&" ")-1)
 
Upvote 0
I figured it would be an easy solution for you pros...took me all of 10 seconds to copy, adjust and replicate over 8000 records. Thanks so much. Now, if you have any fixes for 104 degree Texas heat, I'm all ears :)
 
Upvote 0
Hi,

Solution for your latest request:


Book1
IJ
1104 degree Texas heat74
Sheet148
Cell Formulas
RangeFormula
J1=LEFT(I1,3)-30&CHAR(176)


:rofl:
 
Upvote 0
How about
Code:
Sub AirConOn()
   Dim x As Long
   Do Until x = 80
      Range("B1") = "Current temprature is " & 104 - x & Chr(176)
      x = x + 10
      Application.Wait Now + TimeValue("00.00.02")
   Loop
End Sub
:)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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