+ Reply to Thread
Results 1 to 11 of 11

replace values between specific characters

Hybrid View

  1. #1
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: replace values between specific charaters

    Function RemoveBrackets(aString As String) As String
        Dim i As Long, Snippets As Variant
        Snippets = Split(aString, " ")
        For i = 0 To UBound(Snippets) Step 2
            If Left(Snippets(i)) <> "<" Then
                RemoveBrackets = RemoveBrackets & Snippets(i)
            End If
        Next i
    End Function
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  2. #2
    Registered User
    Join Date
    07-09-2008
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    91

    Re: replace values between specific characters

    thanks for the quick response =D

    i am getting this in Microsoft Visual Basic Editor after trying out the code:

    Compile error: Argument not optional
    Then it highlights the "Left" in the
    If Left(Snippets(i)) <> "<" Then
    string

    i am running excel 07, and i hope that doesn't make a difference? thanks again!

+ 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