+ Reply to Thread
Results 1 to 3 of 3

trim leading spaces

  1. #1
    Registered User
    Join Date
    08-01-2006
    Posts
    4

    trim leading spaces

    I am trying to trim leading and ending spaces with
    bl3 = UCase(bl1) 'convert to uper case

    LTrim (bl3)
    RTrim (bl3)

    however it does not work

    any ideas

  2. #2
    Jay
    Guest

    RE: trim leading spaces

    Try using:
    bl3 = UCase(Trim(bl1))

    "captain bob" wrote:

    >
    > I am trying to trim leading and ending spaces with
    > bl3 = UCase(bl1) 'convert to uper case
    >
    > LTrim (bl3)
    > RTrim (bl3)
    >
    > however it does not work
    >
    > any ideas
    >
    >
    > --
    > captain bob
    > ------------------------------------------------------------------------
    > captain bob's Profile: http://www.excelforum.com/member.php...o&userid=36988
    > View this thread: http://www.excelforum.com/showthread...hreadid=567887
    >
    >


  3. #3
    Jay
    Guest

    RE: trim leading spaces

    I should have also mentioned that you have to assign the result of the
    LTrim/RTrim to a variable.

    So this should also work:
    bl3 = UCase(bl1)
    bl3 = LTrim(bl3)
    bl3 = RTrim(bl3)

    "Jay" wrote:

    > Try using:
    > bl3 = UCase(Trim(bl1))
    >
    > "captain bob" wrote:
    >
    > >
    > > I am trying to trim leading and ending spaces with
    > > bl3 = UCase(bl1) 'convert to uper case
    > >
    > > LTrim (bl3)
    > > RTrim (bl3)
    > >
    > > however it does not work
    > >
    > > any ideas
    > >
    > >
    > > --
    > > captain bob
    > > ------------------------------------------------------------------------
    > > captain bob's Profile: http://www.excelforum.com/member.php...o&userid=36988
    > > View this thread: http://www.excelforum.com/showthread...hreadid=567887
    > >
    > >


+ 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