Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Leading Zero and the change command

My data is preceeded by "." up to "........" When I use the change command to
delete the ".", it also drops any leading zeros in the text. The field is
formatted as text and the data is not proceeded by a single quote.
Ex. ...01263 changes to 1263. Any ideas why this would happen?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Leading Zero and the change command

When you get rid of the leading full-stops and are left with 01263,
then Excel will treat this as if you typed it in - it comprises only
numeric characters, therefore it must be a number, and any leading
zeroes can therefore be ignored (Excel's logic).

If all your numbers are to be 5 digits in length, then you could use

=RIGHT(A1,5)

or alternatively you could apply a custom format to the cells, but you
will need to give a few more details concerning the variations in your
numbers if you want a more complete answer.

Hope this helps.

Pete

On Jun 6, 10:46 pm, mmccoog wrote:
My data is preceeded by "." up to "........" When I use the change command to
delete the ".", it also drops any leading zeros in the text. The field is
formatted as text and the data is not proceeded by a single quote.
Ex. ...01263 changes to 1263. Any ideas why this would happen?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Leading Zero and the change command

Thanks Pete. My data is various lengths so instead of deleting the '.', I
changed it to a single quote and that did the trick. Thanks for your response.
Mary Ann

"Pete_UK" wrote:

When you get rid of the leading full-stops and are left with 01263,
then Excel will treat this as if you typed it in - it comprises only
numeric characters, therefore it must be a number, and any leading
zeroes can therefore be ignored (Excel's logic).

If all your numbers are to be 5 digits in length, then you could use

=RIGHT(A1,5)

or alternatively you could apply a custom format to the cells, but you
will need to give a few more details concerning the variations in your
numbers if you want a more complete answer.

Hope this helps.

Pete

On Jun 6, 10:46 pm, mmccoog wrote:
My data is preceeded by "." up to "........" When I use the change command to
delete the ".", it also drops any leading zeros in the text. The field is
formatted as text and the data is not proceeded by a single quote.
Ex. ...01263 changes to 1263. Any ideas why this would happen?




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
change the face color of an Excel command button Chris Leah Excel Discussion (Misc queries) 5 April 21st 23 09:03 AM
How do I change font colour in an if command? Alex_W Excel Worksheet Functions 1 May 3rd 06 02:27 PM
CHANGE DATA SERIES WITH A COMMAND BUTTON Raymond Willis Charts and Charting in Excel 5 December 5th 05 05:49 PM
Change Name of Command Button comotoman Excel Discussion (Misc queries) 2 October 26th 05 05:23 PM
use replace command to change the contents of formulas Jordan Excel Discussion (Misc queries) 3 June 27th 05 04:51 PM


All times are GMT +1. The time now is 06:36 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"