Consulting

Results 1 to 6 of 6

Thread: problem replacing string by another one

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    38
    Location

    problem replacing string by another one

    hey guys

    how can i in a sheet find string "FAB002" and whenever i find it i should replace it with "125389_00" string.

    thnks in advance
    regards

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Find and Replace, Ctrl-H
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Mar 2009
    Posts
    38
    Location
    i know this xld but i want to integate it in a macro u c ?

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    [VBA] Activesheet.Cells.Replace What:="FAB002", Replacement:="125389_00", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
    [/VBA]
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by mehdoush
    i know this xld but i want to integate it in a macro u c ?
    Then do it in Excel with the macro recorder on. This will create the code and show you a technique.
    Last edited by Bob Phillips; 07-05-2009 at 08:29 AM.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Regular
    Joined
    Mar 2009
    Posts
    38
    Location
    thank you guys

Posting Permissions

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