#1   Report Post  
cj21
 
Posts: n/a
Default Changing numbers


I have about 5000 product code entries, but they all need changing, i
want to get rid of the last two digits:

e.g 01234500 to 012345

Is there a way to do this for all the entries quickly?


--
cj21
------------------------------------------------------------------------
cj21's Profile: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=391238

  #2   Report Post  
Paul Sheppard
 
Posts: n/a
Default


If all numbers are the same number of chaacters you could use the
following formula to get rid of the 0's

If 01234500 is in cell A1 then in cell B1 enter =MID(A1,1,6) where 1 is
the number of the first character to include and 6 is the number of
characters to include, so in this example it would return the value
012345

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238

  #3   Report Post  
Paul Sheppard
 
Posts: n/a
Default


If the numbers have varying numbers of characters you could use the
following formula to get rid of the 0's

If the number is in cell A1 then in cell B1 enter =MID(A1,1,LEN(A1)-2)

If the number is 01234500 it will return the value 012345

If the number is 012345678900 it will return the value 012456789

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238

  #4   Report Post  
cj21
 
Posts: n/a
Default


Paul you are a genius, that's saved me alot of work.

Chris


--
cj21
------------------------------------------------------------------------
cj21's Profile: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=391238

  #5   Report Post  
SCW
 
Posts: n/a
Default

Is there a way to get rid of all the numbers except the last 2. The number
lengths vary from 6 to 8 digits?

Thanks

"Paul Sheppard" wrote:


If the numbers have varying numbers of characters you could use the
following formula to get rid of the 0's

If the number is in cell A1 then in cell B1 enter =MID(A1,1,LEN(A1)-2)

If the number is 01234500 it will return the value 012345

If the number is 012345678900 it will return the value 012456789

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238




  #6   Report Post  
Lisa Files
 
Posts: n/a
Default

You could do a right align (highlight column) and then under DATA select
"Text To Columns". select the option "fixed with" click "next" click in the
data preview area where you want to cut off (last two numbers) click next.
In the data preview area select the side of the data that you do not want
(left side) click on the "do not import column (skip)" option. Click on the
right side; click the "text" option and then "Finish"



"SCW" wrote:

Is there a way to get rid of all the numbers except the last 2. The number
lengths vary from 6 to 8 digits?

Thanks

"Paul Sheppard" wrote:


If the numbers have varying numbers of characters you could use the
following formula to get rid of the 0's

If the number is in cell A1 then in cell B1 enter =MID(A1,1,LEN(A1)-2)

If the number is 01234500 it will return the value 012345

If the number is 012345678900 it will return the value 012456789

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238


  #7   Report Post  
SCW
 
Posts: n/a
Default

Thank you.

"Lisa Files" wrote:

You could do a right align (highlight column) and then under DATA select
"Text To Columns". select the option "fixed with" click "next" click in the
data preview area where you want to cut off (last two numbers) click next.
In the data preview area select the side of the data that you do not want
(left side) click on the "do not import column (skip)" option. Click on the
right side; click the "text" option and then "Finish"



"SCW" wrote:

Is there a way to get rid of all the numbers except the last 2. The number
lengths vary from 6 to 8 digits?

Thanks

"Paul Sheppard" wrote:


If the numbers have varying numbers of characters you could use the
following formula to get rid of the 0's

If the number is in cell A1 then in cell B1 enter =MID(A1,1,LEN(A1)-2)

If the number is 01234500 it will return the value 012345

If the number is 012345678900 it will return the value 012456789

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238


  #8   Report Post  
Paul Sheppard
 
Posts: n/a
Default


Hi SCW

Another way to extract the last 2 digits would be to use this formula
in the cell next to the numbers you want to change

=IF(LEN(A3)=6,MID(A3,5,2),IF(LEN(A3)=7,MID(A3,6,2) ,MID(A3,7,2)))

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=391238

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ranking changing numbers Math Doctor Excel Discussion (Misc queries) 1 June 11th 05 07:05 PM
Stop Excel from changing numbers to dates in CSV file Curt L. Excel Discussion (Misc queries) 2 June 7th 05 12:23 AM
How do I automatically calculate YTD numbers by changing a date? MDSistah Excel Worksheet Functions 1 April 29th 05 05:52 PM
Putting numbers in excel without it changing into a formula? RachaelDPT Excel Worksheet Functions 3 April 22nd 05 10:12 AM
Numbers aren't changing with new format why? Cyndy Excel Discussion (Misc queries) 4 March 17th 05 07:15 AM


All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"