Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to stop Excel from automatically truncating leading zeros

Is there a setting in Excel 2007 to keep it from automatically trunkating
leading zeros like when pasting in zip codes or department codes. When Excel
sees what it thinks is a number, it treats it like a number and drops leading
zeros. Is there a setting in Options or somewhere to tell excel to leave the
leading zeros. We open lots of CSV files in EXCEL and it sees a number (such
as a department code) and drops the leading zeros. In simple, does Excel have
a setting to prevent this from happening as a default????

Thanks
Kenny
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to stop Excel from automatically truncating leading zeros

In simple, does Excel have
a setting to prevent this from happening as a default????


Simply, No.

But there are things you can do. You can format the range as text and
leading zeroes will be retained.

If your numbers are a fixed length (say) 9 digits you can apply a custom
format of 000000000 that's 9 zeroes. Now the number 1 will show as 000000001

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Kenny A." wrote:

Is there a setting in Excel 2007 to keep it from automatically trunkating
leading zeros like when pasting in zip codes or department codes. When Excel
sees what it thinks is a number, it treats it like a number and drops leading
zeros. Is there a setting in Options or somewhere to tell excel to leave the
leading zeros. We open lots of CSV files in EXCEL and it sees a number (such
as a department code) and drops the leading zeros. In simple, does Excel have
a setting to prevent this from happening as a default????

Thanks
Kenny

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How to stop Excel from automatically truncating leading zeros

No default for this.

Are you able to change the extension of the *.csv files to *.txt

If so, when you open them the Text Wizard will open and you can designate
text formatting for each column.


Gord Dibben MS Excel MVP

On Tue, 13 Apr 2010 14:31:02 -0700, Kenny A.
wrote:

Is there a setting in Excel 2007 to keep it from automatically trunkating
leading zeros like when pasting in zip codes or department codes. When Excel
sees what it thinks is a number, it treats it like a number and drops leading
zeros. Is there a setting in Options or somewhere to tell excel to leave the
leading zeros. We open lots of CSV files in EXCEL and it sees a number (such
as a department code) and drops the leading zeros. In simple, does Excel have
a setting to prevent this from happening as a default????

Thanks
Kenny


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
How do I stop Excel from dropping leading zeros? Carl Nash Excel Discussion (Misc queries) 9 April 22nd 09 08:11 PM
Stop automatically removing leading zeros? Jessica P[_2_] Excel Discussion (Misc queries) 2 November 17th 08 09:47 PM
How do you stop excel removing the leading zeros in a cell? ck2007 Excel Discussion (Misc queries) 2 May 25th 07 06:16 PM
automatically prefix cell entry with leading zeros Automatic prefix set with leading zeros Excel Worksheet Functions 2 March 9th 07 02:32 AM
Stop Excel from stripping out leading zeros when saving as CSV MattM Excel Discussion (Misc queries) 4 June 26th 06 11:35 AM


All times are GMT +1. The time now is 09:38 PM.

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"