pulling characters out of a string

P

Patrick

I have a column with numbers that are either 3 or 4 characters in length. I
would Like to delete just the last two characters. Is there an easy way to do
this?
Thanks
 
J

JulieD

Hi Patrick

so if you have
123
1234
you want
1 and
12
if so then in a column next to your data enter
=LEFT(A1,LEN(A1)-2)
(where A1 is the first value of the orginal data)
and fill down - move cursor over bottom right of cell until you see a + then
double click
if you want to get rid of the original numbers, select this new column &
copy it,
click on the first cell of the old numbers and choose edit / paste special -
values

Hope this helps
Cheers
JulieD
 
T

tjtjjtjt

If you use a Helper Column, you can do the Formula below. Then Copy the
Results and use Edit Paste Special to get the Values. then delete the
original data, if necessary.

=IF(LEN(A1)=4,LEFT(A1,2),LEFT(A1,1))

If you are doing this with numbers, you may want to use a slight variation:
=VALUE(IF(LEN(A1)=4,LEFT(A1,2),LEFT(A1,1)))

tj
 

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