How do I strip out the content in an Excel cell so that I can create and optimized list of words

Posted on 2011-03-15
Last Modified: 2013-11-19
I have an excel file I copied from a public source for this example. I was looking for a simple way to do two things in excel.
1. Remove the everything after the state (getting rid of the population information)
2. Replacing it back with a comma after the city and or forcing quotes around both city and State.

The purpose is to identify for me the cities that I would like to market my consulting services to. I already have clients in many of the listed cities and I wanted to make sure future potential customers are aware that I travel to their cities. So i wanted to make sure that the names of the cities I traveled to were listed in and on my site. I have many more favorite towns I frequent that I would like to add as well. Your support is greatly appreciated. Thank you.
Question by:ruavol2
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
  • 4
LVL 33

Accepted Solution

jppinto earned 500 total points
ID: 35140376
1) you can use this formula: =MID(B2,1,FIND("(",B2)-2)

see attached file.

LVL 33

Assisted Solution

jppinto earned 500 total points
ID: 35140388
For 2), for instance, for the first line:

New York, New York (pop 8,213,839)

How would it look like after the transformation you want to do?
LVL 33

Assisted Solution

jppinto earned 500 total points
ID: 35140395
Like this?

"New York", "New York"
LVL 33

Assisted Solution

jppinto earned 500 total points
ID: 35140558
Actually, for 1) you should use this formula instead because you a space on the beginning of each row:


Author Closing Comment

ID: 35235794
Thank you very much.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

728 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