+ Reply to Thread
Results 1 to 4 of 4

InStr function not working when extracting characters to right of character in VBA

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    InStr function not working when extracting characters to right of character in VBA

    Hey all,

    I try to extract all the content after the character V in cell G and place it in cell m as part of procedure:

    Please Login or Register  to view this content.
    It does not put the values right of "V" from G into cell O. In fact, even though cell G does contain "V" in it, it leaves cell O completely blank for all instances.
    Last edited by johnmerlino; 02-25-2011 at 01:59 PM.

  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: InStr function not working when extracting characters to right of character in VB

    Try this:
    Please Login or Register  to view this content.
    Last edited by shg; 02-23-2011 at 04:44 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: InStr function not working when extracting characters to right of character in VB

    You have the parameters backwards on your call to InStr. Try this
    Please Login or Register  to view this content.
    BTW why are you doing a regular expression match on a string with no regexp characters in it?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: InStr function not working when extracting characters to right of character in VB

    @stringjazzer

    your solution worked perfectly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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