+ Reply to Thread
Results 1 to 2 of 2

Find and Replace Substring

  1. #1
    Registered User
    Join Date
    08-21-2011
    Location
    ncalenti
    MS-Off Ver
    2010
    Posts
    3

    Find and Replace Substring

    Here is an interesting problem that I am having a hard time coming up with a vba solution for. I have a set of strings similar to this:

    =SERIES(Month!$L$6,Month!$A$7:$A$19,Month!$L$7:$L$19,1)

    I would like to replace the "19" programatically. The tricky part is that I wont know that the number is 19. IE. I cant just simply search for 19 and replace it because there are many of these strings all with differing values.

    I need a solution that does something along the lines of this:
    1. Look for second comma in string
    2. Replace everything to the left of this comma and to the right of the first "$" with some other number
    3. Repeat for the 3rd comma in the string.

    If anyone could provide a function, or guidance, that would be greatly appreciated.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find and Replace Substring

    See http://peltiertech.com/WordPress/dynamic-charts/
    Entia non sunt multiplicanda sine necessitate

+ 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