+ Reply to Thread
Results 1 to 5 of 5

Trying to find last 6 digits of variable number

  1. #1
    Warhawk
    Guest

    Trying to find last 6 digits of variable number

    Okay, I have variable number lengths of which I am trying to plumb
    the last 6 digits of. I.E.:

    2389462965 would be 462965
    03702362 would be 702362

    You guys are great and always have helped me! I thank you all in
    advance!
    Government's view of the economy could be summed up in a few short phrases: If it moves, tax it. If it keeps moving, regulate it. And if it stops moving, subsidise it.
    Ronald Reagan

  2. #2
    Pete_UK
    Guest

    Re: Trying to find last 6 digits of variable number

    Just use the RIGHT( ) function in conjunction with LEN( ), i.e.
    assuming the number is in A1:

    =VALUE(RIGHT(A1,LEN(A1)-6))

    The VALUE( ) function ensures you have a numeric value - without it you
    would have a string.

    Hope this helps.

    Pete


  3. #3
    Dave Peterson
    Guest

    Re: Trying to find last 6 digits of variable number

    One more:

    =--RIGHT(TEXT(A1,"000000"),6)



    Warhawk wrote:
    >
    > Okay, I have variable number lengths of which I am trying to plumb
    > the last 6 digits of. I.E.:
    >
    > 2389462965 would be 462965
    > 03702362 would be 702362
    >
    > You guys are great and always have helped me! I thank you all in
    > advance!
    > Government's view of the economy could be summed up in a few short phrases: If it moves, tax it. If it keeps moving, regulate it. And if it stops moving, subsidise it.
    > Ronald Reagan


    --

    Dave Peterson

  4. #4
    Pete_UK
    Guest

    Re: Trying to find last 6 digits of variable number

    Ignore the above - all you need is:

    =VALUE(RIGHT(A1,6))

    Must have been having a Senior moment!

    Pete


  5. #5
    Ron Rosenfeld
    Guest

    Re: Trying to find last 6 digits of variable number

    On Tue, 07 Mar 2006 16:53:15 -0600, Warhawk <[email protected]> wrote:

    >Okay, I have variable number lengths of which I am trying to plumb
    >the last 6 digits of. I.E.:
    >
    >2389462965 would be 462965
    >03702362 would be 702362
    >
    >You guys are great and always have helped me! I thank you all in
    >advance!
    >Government's view of the economy could be summed up in a few short phrases: If it moves, tax it. If it keeps moving, regulate it. And if it stops moving, subsidise it.
    >Ronald Reagan



    =MOD(A1/10^6,1)*10^6


    --ron

+ 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