Solved

Data Cleansing & Text Formulas with Excel 2010

Posted on 2012-03-11
3
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

623 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