Zero formatting :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Zero formatting
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

jonah
Board Regular


Joined: 11 Aug 2003
Posts: 8

Flag: Sweden

Status: Offline

 Reply with quote  

Zero formatting

Hi!
Importing a text file into excel and wants to keep all values the same as original format. Problem is that zeros are taken out, i.e 00 becomes 0, 009 becomes 9 etc. I tried using format/text both before and after importing the file without any luck. Textfile constists of long, continous text which I'm using excel to split up into columns.

Post Fri Sep 19, 2003 11:57 am 
 View user's profile Send private message

Andrew Poulsom
MrExcel MVP


Joined: 22 Jul 2002
Posts: 8266

Flag: Uk

Status: Offline

 Reply with quote  

Re: Zero formatting

At Step 3 of the Text to Columns Wizard click the offending column and check Text under Column data format.

Post Fri Sep 19, 2003 12:11 pm 
 View user's profile Send private message

jmiskey
Board Master
Board Master


Joined: 02 Aug 2002
Posts: 3246

Flag: Usa

Status: Offline

 Reply with quote  

Re: Zero formatting

If you are importing through the Excel import wizard, you have the capability of telling Excel the data format of the the fields you are importing (Step 3 of the import). For all the fields that you are bringing that you want to keep leading zeroes, bring them in as Text instead of General.
_________________
Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!

Post Fri Sep 19, 2003 12:12 pm 
 View user's profile Send private message

jonah
Board Regular


Joined: 11 Aug 2003
Posts: 8

Flag: Sweden

Status: Offline

 Reply with quote  

Re: Zero formatting

Thanks guys! That solved it.

Post Fri Sep 19, 2003 12:29 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.