Trying to find last 6 digits of variable number

  • Thread starter Thread starter Warhawk
  • Start date Start date
W

Warhawk

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
 
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
 
One more:

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


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
 
Ignore the above - all you need is:

=VALUE(RIGHT(A1,6))

Must have been having a Senior moment!

Pete
 
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
 
Back
Top