Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tidy up Mc/Mac/O in Excel database

Posted on 2015-02-20
3
Medium Priority
?
41 Views
Last Modified: 2015-02-24
I got a question about ways to clean up the following..
someone has entered Mc Donald instead of McDonald or MacDonald. Or someone enters O Brien instead of O'Brien....is there a way to tidy up the data in Excel to the desired format? Thanks :-)
0
Comment
Question by:agwalsh
[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
3 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 1000 total points
ID: 40620769
The only way I know is to search for the strings, by dropping extra formula columns down the end of your table.
e.g. =OR(LEFT(A2,3)="Mc ",LEFT(A2,2)="o ",LEFT(A2,4)="mac ")
Then you can filter on TRUE in the new column to find all the ones to change.
You could do the replacement directly with a formula, but I find it safest to visually inspect the data first.
e.g. a sample formula for the first case you mentioned would be:
=SUBSTITUTE(A2,"Mc ","Mc",1)
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1000 total points
ID: 40621518
Apply a filter to the data and then on the Name column enable the filter and select the tick boxes for those that match the various options, ie Mc D, McD, MacD.

From those that are visible select one that is correct and copy. You can then select the remainder of the column and paste, so long as you have only selected one cell to copy, this will only paste into the visible cells.

Repeat for next option.
0
 

Author Closing Comment

by:agwalsh
ID: 40627618
Does the job both of them but just chose the SimonAdept solution as best solution for its elegance and flexibility. But both do the job.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
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.
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

660 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