+ Reply to Thread
Results 1 to 2 of 2

Custom macro for removing cells containing specific location keywords

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    Indianapolis
    MS-Off Ver
    Excel 2003
    Posts
    1

    Custom macro for removing cells containing specific location keywords

    Hello, I'm trying to create a macro that will identify cells in column A and remove them based on a set of keywords, specifically the 50 states and largest 100 US cities. I've found macros that can remove cells with one specific keyword identified, but I have no idea how to make one to remove cells based on multiple keywords, let alone 150. What would be the best way to approach this? Thanks!

    50 states:
    “Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio , Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin, Wyoming”

    100 Cities:
    “New York, Los Angeles, Chicago, Houston, Philadelphia, Phoenix, San Antonio, San Diego, Dallas, San Jose, Austin, Jacksonville, Indianapolis, San Francisco, Columbus, Fort Worth, Charlotte, Detroit, El Paso, Memphis, Boston, Seattle, Denver, Washington, Nashville, Davidson, Baltimore, Louisville/Jefferson County, Portland, Oklahoma City, Milwaukee, Las Vegas, Albuquerque, Tucson, Fresno, Sacramento, Long Beach, Kansas City, Mesa, Virginia Beach, Atlanta, Colorado Springs, Raleigh, Omaha, Miami, Oakland, Tulsa, Minneapolis, Cleveland, Wichita, Arlington, New Orleans, Bakersfield, Tampa, Honolulu, Anaheim, Aurora, Santa Ana, St. Louis, Riverside, Corpus Christi, Pittsburgh, Lexington Fayette, Anchorage, Stockton, Cincinnati, St. Paul, Toledo, Newark, Greensboro, Plano, Henderson, Lincoln, Buffalo, Fort Wayne, Jersey City, Chula Vista, Orlando, St. Petersburg, Norfolk, Chandler, Laredo, Madison, Durham, Lubbock, Winston Salem, Garland, Glendale, Hialeah, Reno, Baton Rouge, Irvine, Chesapeake, Irving, Scottsdale, North Las Vegas, Fremont, Gilbert, San Bernardino, Boise City, Birmingham”

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Custom macro for removing cells containing specific location keywords

    you could create 2 array's and compare each cell to what is in the arrays....actually you could create 1 big array and do the same thing....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 07-11-2013, 02:08 AM
  2. Replies: 1
    Last Post: 06-30-2013, 05:58 PM
  3. Save a Macro Enabled Template to a custom location with a custom file name.
    By andcha in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-24-2013, 11:46 AM
  4. Searching for specific letter in specific location in cells
    By pmoniz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 08:26 AM
  5. Specific keywords copying data to cells
    By Leo Edwards in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-12-2006, 10:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1