Solved

Data Cleansing & Text Formulas with Excel 2010

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now