Solved

Data Cleansing & Text Formulas with Excel 2010

Posted on 2012-03-11
3
344 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

751 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