+ Reply to Thread
Results 1 to 3 of 3

Find & Replace only specific data

  1. #1
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Find & Replace only specific data

    I need your help, guys!

    Is there any way to find only specific data and replace it with blank in programming? See below for example:

    Before - I am searching for AA

    AA BBCCAA
    ABBAACC
    AABBCC

    After - the result should be the following:
    BBCC
    ABBCC
    BBCC

    Your help on this is appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can use the built in Find/Replace features.

    Go to Edit|Replace

    Find What: AA
    Replace With: (leave blank).

    Click Replace All. Click Ok.

    To eliminate leading spaces..

    Go to Edit|Replace again

    Find What: (enter a single space)
    Replace With: (leave blank).

    Click Replace All. Click Ok.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-17-2008
    Posts
    51

    Find and Replace only specific data

    Thanks NVBC!

    I require a vba code but it is fine! I have found in MSDN a sample code that replace a specific data.

    ActiveSheet.Columns("A").Replace What:="AA", Replacement:="", _
    SearchOrder:=xlByColumns, MatchCase:=True

+ Reply to Thread

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