How can I remove the trailing "1" from a worksheet.


T

thecjguy1

I have a long column of numbers some large numbers, but they all have a "1" at the end.
How can I use excel to truncate the trailing digit from every entry?
for instance.
801
1761581
etc...
should read
80
176158

Thanks,
Crzzy1
 
Ad

Advertisements

C

Claus Busch

Hi,

Am Sat, 23 Feb 2013 09:15:08 -0800 (PST) schrieb (e-mail address removed):
I have a long column of numbers some large numbers, but they all have a "1" at the end.
How can I use excel to truncate the trailing digit from every entry?
for instance.
801
1761581
etc...
should read
80
176158
your numbers in column A:
=--LEFT(A1,LEN(A1)-1)
or with VBA:

Sub CutLastDigit()
Dim LRow As Long
Dim rngC As Range

LRow = Cells(Rows.Count, 1).End(xlUp).Row
For Each rngC In Range("A1:A" & LRow)
rngC = CLng(Left(rngC, Len(rngC) - 1))
Next
End Sub


Regards
Claus Busch
 
Ad

Advertisements

S

srimanta

I have a long column of numbers some large numbers, but they all have a "1" at the end.

How can I use excel to truncate the trailing digit from every entry?

for instance.

801

1761581

etc...

should read

80

176158



Thanks,

Crzzy1
Or Simply u can keep
=(A2-1)/10
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top