ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   pulling characters out of a string (https://www.excelbanter.com/excel-worksheet-functions/6323-pulling-characters-out-string.html)

Patrick

pulling characters out of a string
 
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

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

"Patrick" wrote in message
...
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




Frank Kabel

Hi
=LEFT(A1,LEN(A1)-2)

--
Regards
Frank Kabel
Frankfurt, Germany

"Patrick" schrieb im Newsbeitrag
...
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



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

"Patrick" wrote:

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



All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com