Excel 2003 - Separating Text in brackets

Silver Fox

New Member
Joined
Mar 11, 2005
Messages
6
Hi,


Apols - I'm struggling with this!

I've got one column containing data and which I would like to separate into two columns.
The data looks like this:-
017A - Sitting/Rest Room (Sitting Room 10sq m (SF) inc TV)
What I'm looking for is a way of saying wherever you see the first open bracket and the last closed bracket, place that text into the adjacent (right hand) column.

Thanks for your help - best wishes
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

ukmikeb

Well-known Member
Joined
Jul 10, 2009
Messages
2,757
Hi

Try -
Code:
=MID($A41,FIND("(",$A41)+1,FIND("#",SUBSTITUTE($A41,")","#",LEN($A41)-LEN(SUBSTITUTE($A41,")",""))))-(FIND("(",$A41)+1))

Changing A41 to your cell.

Formula caters for characters present after last right-hand bracket.

hth
 

Silver Fox

New Member
Joined
Mar 11, 2005
Messages
6
Thanks - it worked perfectly - unfortunately due to more haste, less speed on my behalf I had given some duff info.
What I wanted was to find the data (text) and cut and paste it into the next column on the right.
Many apologies
 

ukmikeb

Well-known Member
Joined
Jul 10, 2009
Messages
2,757
Hi

Place the original formula in column C.

Place the following formula in column B -

Code:
 =SUBSTITUTE($A41,"("&$C41&")","")

obviously changing the cell references (NB it also removes first and last brackets).

Then when you have completed do a Copy and Paste Special - Paste Values only - for columns B and C .

And finally, delete Column A.

hth
 

Silver Fox

New Member
Joined
Mar 11, 2005
Messages
6

ADVERTISEMENT

Mike,

Very many thanks for your help on this,
Best regards,
 

Sunny

New Member
Joined
Apr 10, 2002
Messages
3
Mike

Just had (what would have been) a mammoth task - but thanks to your help it hasn't taken a 10th of the time.
Once again, many thanks,
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,445
Office Version
  1. 365
Platform
  1. Windows
Sounds like the task is long ago done but if the original text always ends with ")" (I'm not sure it does as we only have 1 example to go on) then this would be simpler to get the value in C41:

=REPLACE(LEFT(A41,LEN(A41)-1),1,FIND("(",A41),"")
 

ukmikeb

Well-known Member
Joined
Jul 10, 2009
Messages
2,757
Sunny

Pleased to have helped you save a lot of time on your project.

Pleased to also see that some users are using the Search facility to arrive at solutions to their problems.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,652
Messages
5,838,610
Members
430,557
Latest member
MK15

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
Top