Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove multiple string (2003)

    Hello!
    I like to remove multiple string drom a sheet, from diferent rows and columns tru vba.
    The strings are like this: "(tehn)", "(chim)".... for over 30 of them.
    So i'd like to replace all of this with nothing. How can I do that?
    Thanks.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Remove multiple string (2003)

    Does this do what you want? [Test on a copy: there is NO undo.]

    Add the rest of your list to the array
    <pre>Sub ReplaceList()
    Dim vArrayList
    Dim x As Integer
    vArrayList = Array("(tehn)", "(chim)") 'Add other items to the list
    For x = 0 To UBound(vArrayList)
    ActiveSheet.Cells.Replace What:=vArrayList(x), _
    Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Next
    End Sub</pre>



    Steve

  3. #3
    Lounger
    Join Date
    Feb 2004
    Location
    Romania
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove multiple string (2003)

    Yes man it's work perfectlly.
    Thanks.


    MCN.

Posting Permissions

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