?
Solved

How to remove a word from a column of cells

Posted on 2011-09-18
2
Medium Priority
?
205 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 (Microsoft MVP / EE MVE) earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

650 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