Solved

How to remove a word from a column of cells

Posted on 2011-09-18
2
202 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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;…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

690 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