+ Reply to Thread
Results 1 to 3 of 3

Left/Right function in VBA, finding a specific starting character

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010/Excel 2011
    Posts
    2

    Left/Right function in VBA, finding a specific starting character

    Hello,

    I have a worksheet in which I would like to go through column B and see if any cells in column B start with a "-" character. If they start with "-" then I would like to remove it from the cell. I've been trying to use the left function in several different ways but nothing has worked for me.

    Examples of what I tried:

    Please Login or Register  to view this content.
    This code obviously does not work/compile. Any help is appreciated.

    Thank you.
    Last edited by Cutter; 07-24-2012 at 10:07 AM. Reason: Added code tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Left/Right function in VBA, finding a specific starting character

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-24-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010/Excel 2011
    Posts
    2

    Re: Left/Right function in VBA, finding a specific starting character

    I figured out the code:

    Please Login or Register  to view this content.
    Patel45 thank you. Your code is also correct.
    Last edited by Cutter; 07-24-2012 at 10:08 AM. Reason: Added code tags

+ 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