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.

1005T-BKWH (Hooey, Cody Ohl Black / White Trucker Cap - OSFA)
1005T-BL ( "Cody Ohl" Hooey Blue / Gray Mesh 6-panel trucker with Gray Logo - OFSA)
1005T-BLGY (Hooey, Cody Ohl Blue / Gray Trucker Cap - OSFA)
1005T-BUGY (Hooey, Cody Ohl Maroon / Gray Trucker Cap - OSFA)

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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)


:ROFLMAO:
 
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,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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