+ Reply to Thread
Results 1 to 3 of 3

Find and Replace that contains some word

  1. #1
    Registered User
    Join Date
    07-26-2006
    Posts
    19

    Find and Replace that contains some word

    Hello,
    I would like to find and replace data in some column. Lets say in column C.
    But i have some problem....
    The data in this column which i have to pepcace may contain some aditional texts
    For example :
    I would like to replace .ACD with .ABC
    in come cells .ACD have aditional texts .ADC Bookmark For You.
    Is it possible to replace whole cell which Begins with .ADC with .ABC??

    I wrote this script but it doesnot work

    Sub Replace()

    Range("C").Replace What:=".ACD '*', Replacement:=".ABC"
    End Sub

  2. #2
    Bernie Deitrick
    Guest

    Re: Find and Replace that contains some word

    Sub NewReplace()
    Range("C:C").Replace What:=".ACD", Replacement:=".ABC", lookat:=xlPart
    End Sub

    Or

    Sub NewReplace()
    Range("C:C").Replace What:=".ACD*", Replacement:=".ABC"
    End Sub

    Not sure which you wanted - try them on copies of your data.....

    HTH,
    Bernie
    MS Excel MVP


    "proton" <proton.2ckzs3_1155645008.5635@excelforum-nospam.com> wrote in message
    news:proton.2ckzs3_1155645008.5635@excelforum-nospam.com...
    >
    > Hello,
    > I would like to find and replace data in some column. Lets say in
    > column C.
    > But i have some problem....
    > The data in this column which i have to pepcace may contain some
    > aditional texts
    > For example :
    > I would like to replace .ACD with .ABC
    > in come cells .ACD have aditional texts .ADC Bookmark For You.
    > Is it possible to replace whole cell which Begins with .ADC with
    > ABC??
    >
    > I wrote this script but it doesnot work
    >
    > Sub Replace()
    >
    > Range("C").Replace What:=".ACD '*', Replacement:=".ABC"
    > End Sub
    >
    >
    > --
    > proton
    > ------------------------------------------------------------------------
    > proton's Profile: http://www.excelforum.com/member.php...o&userid=36802
    > View this thread: http://www.excelforum.com/showthread...hreadid=571739
    >




  3. #3
    Registered User
    Join Date
    07-26-2006
    Posts
    19
    10xs a lot
    Its working

+ 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