Solved

How to remove a word from a column of cells

Posted on 2011-09-18
2
201 Views
Last Modified: 2012-05-12
Hi all, I'm a bit new to the website, I had a quick look around existing answers and couldn't come across anything like this:

Basically, I'm trying to clean up addresses. In the addresses column, words such as "Suite", "level", "unit" etc recur. Those words do not necessarily start from the front of the cell and due to data entry errors, are not always separated by a space.

Is there a formula / function or a macro which can identify the words in the cells and automatically delete it from the cells?

Otherwise, happy with a response which can help me automatically delete the word but not detect instances where the word is not separated by a space.

Thanks!

0
Comment
Question by:Singamajig
[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 Comments
 
LVL 16

Expert Comment

by:Carol Chisholm
ID: 36558332
You can use FIND(find_text, within_text, [start_num]), to find the start postion
FIND always counts each character, whether single-byte or double-byte, as 1, no matter what the default language setting is.

And REPLACE(old_text, start_num, num_chars, new_text) to change it.
 use "" to put nothing
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst earned 500 total points
ID: 36558940
Hello,

can you provide a few samples of the source data and the desired output after processing with a formula or macro?  For example


ABC Suite 123, Devonport
Level 2 Domain Building, Northfolk
Parliament Building Level3
James House, Johnson Suite, Level 1
123 Some Street, Unit 2
Unit 4, 123 Some Street


If any mention of "suite", "level", or "unit" is removed, the result will be


ABC  123, Devonport
 2 Domain Building, Northfolk
Parliament Building 3
James House, Johnson ,  1
123 Some Street,  2
 4, 123 Some Street

That can be achieved with

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"Suite",""),"Level",""),"Unit","")

Is that what you need? If an address contains "Level 42", what do you want to remove? Just "Level" , or "Level 42"?

Please clarify your requirements. It would be most helpful if you could post a data sample with a dozen or so addresses "before" and "after" the procedure/formula is applied. The data sample should represent all the variations that you expect to see in your source data, so we know what to look out for.

cheers, teylyn
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
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 use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

733 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