Solved

Data Cleansing & Text Formulas with Excel 2010

Posted on 2012-03-11
3
340 Views
Last Modified: 2012-03-12
Hello Experts,

I'm looking for a text formula or VBA code for removing any text between brackets. For example, the following text:
OMI (ANNEM) (DRAMA EDIT V.)

should be corrected to:
OMI

Another text will have one set of brackets only like the folowing:
LOONEY TUNES (RE-RUN)

This also to be corrected to:
LOONEY TUNES

The text is supplied in Excel sheet in one column, so I can either apply a formula in the adjacent column or loop through the range (For each cell in myRange), depending on the suggested solution.

Thanks in advance for your help,
Hani
0
Comment
Question by:Mehawitchi
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37706838
Sub supprparen()
For Each cel In Range("A:A")
Do While InStr(cel, "(") > 0
cel.Value = Replace(cel, Mid(cel, InStr(cel, "("), InStr(cel, ")") - InStr(cel, "(") + 1), "")
Loop
Next cel
End Sub
0
 

Author Closing Comment

by:Mehawitchi
ID: 37706990
Thank you ssaqibh

This is exactly what I needed
0
 

Author Comment

by:Mehawitchi
ID: 37709140
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question