Removing the trailing string within parentheses in excel

Aruna Kallu

New Member
Joined
Mar 5, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Some of the values in column G end with text surrounded by parenthesis. For example "(Prod Ops)" or "(Limited Access Role)". I am looking to get all occurrences of the text (including parenthesis) removed. In some cases the values have parenthesis and text in the middle of the field (ex. BRASS(DSL) Dev/Test. That should not be changed. I only want the trailing text in parenthesis removed.

Once that text is removed, I would also need any remaining trailing blanks in that column removed.

Can someone help in getting this done?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Excel Formula:
=TRIM(LEFT(G2,FIND(CHAR(1);SUBSTITUTE(G2,"(",CHAR(1),LEN(G2)-LEN(SUBSTITUTE(G2,"(",""))))-1))
 
Upvote 0
Hi,

Based on you description and Limited sample, try this:

Book3.xlsx
AB
1BRASS(DSL) Dev/Test (Prod Ops)BRASS(DSL) Dev/Test
2BRASS(DSL) Dev/TestBRASS(DSL) Dev/Test
3BRASS Dev/TestBRASS Dev/Test
4BRASS Dev/Test (Limited Access Role)BRASS Dev/Test
Sheet827
Cell Formulas
RangeFormula
B1:B4B1=IFERROR(TRIM(LEFT(SUBSTITUTE(A1,"(",REPT(" ",255),IF(FIND(")",A1)=LEN(A1),1,2)),255)),A1)
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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