need help with a formula to remove everything to the right of " (" in a cell

djs6025

New Member
Joined
Feb 6, 2012
Messages
40
Office Version
  1. 2016
Platform
  1. Windows
Hi Everybody,
Can you help with a formula to removed everything to the right of " (" in column A and put the results in cell B as shown below? Thanks so much for your help!

Thanks,
Dan


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]154-150 (154-150 Digi Pro...[/TD]
[TD]154-150[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]154-154 (154-154 Digi Pro...[/TD]
[TD]154-154[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]154-158 (154-158 Digi Pro...[/TD]
[TD]154-158[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
try PowerQuery aka Get&Transform

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]raw[/td][td][/td][td=bgcolor:#70AD47]raw[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]154-150 (154-150 Digi Pro...[/td][td][/td][td=bgcolor:#E2EFDA]154-150[/td][/tr]

[tr=bgcolor:#FFFFFF][td]154-154 (154-154 Digi Pro...[/td][td][/td][td]154-154[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]154-158 (154-158 Digi Pro...[/td][td][/td][td=bgcolor:#E2EFDA]154-158[/td][/tr]
[/table]


Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Extract = Table.TransformColumns(Source, {{"raw", each Text.BeforeDelimiter(_, " ("), type text}})
in
    Extract[/SIZE]
 
Upvote 0
It's a simple formula using LEFT and FIND as:

Code:
=LEFT(A1,FIND(" (",A1)-1)

If you have Excel 365, you can also put 154-150 in B1 and then use Flash Fill from the DATA ribbon.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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