Results 1 to 5 of 5

How to Find and Replace a string if cell does not contain certain texts.

Threaded View

  1. #1
    Registered User
    Join Date
    04-01-2012
    Location
    new york
    MS-Off Ver
    Excel 2007
    Posts
    14

    How to Find and Replace a string if cell does not contain certain texts.

    Hi I want to create a macro that searches a column for a specific criteria, it will then check the portion being replaced if it contains either "Apt", "Suite", or "Floor"
    before replacing it.

    For Ex if I were to Find "*West" and replace with "", I want it to be able to check to see if "Suite" is in the portion being replaced before replacing it, and if it is then dont replace:

    A1) 123 Fake Street West Apt 1
    A2) 234 Random Street Suite 3 West
    A3) 333 Excel Ave West Floor 3


    Result should be the following.
    b1) Apt 1
    b2) 234 Random Street Suite 3 West
    b3) Floor 3

    any ideas?

    thanks!
    Last edited by windcloud2; 04-04-2012 at 11:47 AM.

Thread Information

Users Browsing this Thread

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

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