Removing everything outside brackets in a cell

justin_n84

Board Regular
Joined
Jan 29, 2017
Messages
59
Hi!!

I have a bunch of cells which contain data similar to "[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]0.120 (3.048)". I want to delete everything out side the brackets. Is there an easy way to do this?

Thanks in advance
[/FONT]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Here's one way.

Assumptions
1) Your input data begins in cell A1.
2) Each input contains one, and ONLY one, instance of the "(" character. So never 2 or 3 of these, and they are never entirely absent.
3) Same as (2) for the ")" character.

=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)
 
Upvote 0
Hi there. You can do it with 2 replaces. First, replace "*(" with nothing (leave the replace text blank). The replace ")*" in the same way. If you are wanting to do this many times, just record yourself doing it into a macro.
 
Upvote 0
Another option
=IFERROR(SUBSTITUTE(REPLACE(A2,1,FIND("(",A2),""),")","")*1,A2)
 
Upvote 0
Minor comment - my solution leaves the brackets in place, Fluff's and jamcleary's remove them.

All of the solutions can be adapted to either remove them or leave them.
 
Upvote 0
Another minor comment - my solution replaces the data in situ, both the others require the formula to be in a separate cell. If you want to keep the brackets my solution can be modified the use a replace value of "(" for the first, and ")" for the second. (rereading your original post, that's what you wanted I think).
 
Upvote 0
so do a replace using "**"?

If so this deletes everything in the cell....

If not can you please show exactly as it needs to be typed?

Thanks
 
Upvote 0
It needs to be *(
& leave the Replace box blank, or if you want to keep the brackets put a ( in the replace box
 
Last edited:
Upvote 0
Yes I am sure. But I may be doing it incorrectly. So if you could show me exactly what to type in that would be much appreciated. Consider me an absolute beginner to excel..... ;)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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