Removing the rightmost digit

  • Thread starter Thread starter supersonicf111
  • Start date Start date
S

supersonicf111

I'm full of questions today, is there a way to remove the rightmost
digit from a list of numbers? Example below.


Original number

123456


Returned number

12345

Thanks in advance for your help!!!!
 
supersonicf111 said:
I'm full of questions today, is there a way to remove the rightmost
digit from a list of numbers? Example below.


Original number

123456


Returned number

12345

Thanks in advance for your help!!!!

Dim x As Long, y As Long
x = "123456"
y = Int(x / 10)
MsgBox y
 
As ussual, I left out too many details.

Dan,

I forgot to include that some of the numbers start with a letter like
below, while the others are just numbers.

D12334
123456

And Steve, I am not following you.


Sorry!
Brett
 
Brett,

Take off the "--" from the front of my formula. That was to force
the returned value to be a number. If all you need is a string
=LEFT(A1,LEN(A1)-1) should work

Dan E
 
supersonicf111 said:
As ussual, I left out too many details.

Dan,

I forgot to include that some of the numbers start with a letter like
below, while the others are just numbers.

D12334
123456

And Steve, I am not following you.

That's because I'd made all the wrong assumptions.

Because of the group you were posting in I thought you were looking for
a programming solution.

I also thought you were looking for a solution for numbers.
 
Back
Top