+ Reply to Thread
Results 1 to 8 of 8

Trim

  1. #1
    Steved
    Guest

    Trim

    Hello from Steved

    I would like to trim B0101 to 101 please.

    I know how to do it but right now I just cannot remember how.

    Thankyou.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    =RIGHT(A1,3)

    VBA Noob

  3. #3
    WillR
    Guest

    RE: Trim

    either

    =RIGHT(A1,3)

    or

    =MID(A1,3,3)

    where A1 is B0101

    --
    Kind Regards,
    Will Riley


    "Steved" wrote:

    > Hello from Steved
    >
    > I would like to trim B0101 to 101 please.
    >
    > I know how to do it but right now I just cannot remember how.
    >
    > Thankyou.


  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    It's hard to tell your intent from one example

    what happens if you have B00001?

    Perhaps

    =REPLACE(A1,1,1,"")+0

  5. #5
    Steved
    Guest

    RE: Trim

    Thankyou Will.

    "WillR" wrote:

    > either
    >
    > =RIGHT(A1,3)
    >
    > or
    >
    > =MID(A1,3,3)
    >
    > where A1 is B0101
    >
    > --
    > Kind Regards,
    > Will Riley
    >
    >
    > "Steved" wrote:
    >
    > > Hello from Steved
    > >
    > > I would like to trim B0101 to 101 please.
    > >
    > > I know how to do it but right now I just cannot remember how.
    > >
    > > Thankyou.


  6. #6
    Steved
    Guest

    Re: Trim

    Hello daddylongles from Steved

    I thankyou for your formula as I can have B0027 which Leave 27 and B0127
    will leave
    127.

    Cheers.

    "daddylonglegs" wrote:

    >
    > It's hard to tell your intent from one example
    >
    > what happens if you have B00001?
    >
    > Perhaps
    >
    > =REPLACE(A1,1,1,"")+0
    >
    >
    > --
    > daddylonglegs
    > ------------------------------------------------------------------------
    > daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
    > View this thread: http://www.excelforum.com/showthread...hreadid=566804
    >
    >


  7. #7
    JMB
    Guest

    Re: Trim

    Perhaps

    =--SUBSTITUTE(A1,"B","")
    or
    =TEXT(--SUBSTITUTE(A1,"B",""),"#")
    if you need it to remain text.


    "Steved" wrote:

    > Hello daddylongles from Steved
    >
    > I thankyou for your formula as I can have B0027 which Leave 27 and B0127
    > will leave
    > 127.
    >
    > Cheers.
    >
    > "daddylonglegs" wrote:
    >
    > >
    > > It's hard to tell your intent from one example
    > >
    > > what happens if you have B00001?
    > >
    > > Perhaps
    > >
    > > =REPLACE(A1,1,1,"")+0
    > >
    > >
    > > --
    > > daddylonglegs
    > > ------------------------------------------------------------------------
    > > daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
    > > View this thread: http://www.excelforum.com/showthread...hreadid=566804
    > >
    > >


  8. #8
    JMB
    Guest

    Re: Trim

    Did not see daddylonglegs already has the solution at the bottom of his post.

    "Steved" wrote:

    > Hello daddylongles from Steved
    >
    > I thankyou for your formula as I can have B0027 which Leave 27 and B0127
    > will leave
    > 127.
    >
    > Cheers.
    >
    > "daddylonglegs" wrote:
    >
    > >
    > > It's hard to tell your intent from one example
    > >
    > > what happens if you have B00001?
    > >
    > > Perhaps
    > >
    > > =REPLACE(A1,1,1,"")+0
    > >
    > >
    > > --
    > > daddylonglegs
    > > ------------------------------------------------------------------------
    > > daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
    > > View this thread: http://www.excelforum.com/showthread...hreadid=566804
    > >
    > >


+ 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