Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Inputting variable length data - outputting fixed character result

I'm opening a CSV file in excel and I need to reformat the data to input into
another software. The problem is that the output includes 1 column that must
be 26 characters in lenght (leading zeroes). The imported column will vary
from 3 to eight characters.

Is there a way to insert a variable amount of leading zeroes dependent upon
the length of the source?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Inputting variable length data - outputting fixed character result

While it is possible to introduce leading zeros thru formatting, they may not
export. Instead, if your values are in column A starting in A1, then in B1
enter:

=REPT("0",26-LEN(A1)) & A1 and copy down. The correct number of leading
zeros will be supplied
--
Gary''s Student - gsnu200751


"Webster" wrote:

I'm opening a CSV file in excel and I need to reformat the data to input into
another software. The problem is that the output includes 1 column that must
be 26 characters in lenght (leading zeroes). The imported column will vary
from 3 to eight characters.

Is there a way to insert a variable amount of leading zeroes dependent upon
the length of the source?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Inputting variable length data - outputting fixed character result

Format/ Cells/ Custom/ 00000000000000000000000000
--
David Biddulph

"Webster" wrote in message
...
I'm opening a CSV file in excel and I need to reformat the data to input
into
another software. The problem is that the output includes 1 column that
must
be 26 characters in lenght (leading zeroes). The imported column will
vary
from 3 to eight characters.

Is there a way to insert a variable amount of leading zeroes dependent
upon
the length of the source?



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
Parsing Last Character in variable length text field Traci Excel Worksheet Functions 3 October 4th 07 04:11 PM
Inputting a length of time? Link New Users to Excel 12 May 22nd 07 11:49 AM
Adding "fixed" data to variable length data [email protected] Excel Worksheet Functions 3 February 16th 06 08:59 PM
Save data in a worksheet in fixed length fields... dietzd Excel Discussion (Misc queries) 1 January 26th 05 06:17 PM
length of character data Saravanan Excel Discussion (Misc queries) 2 December 19th 04 06:49 PM


All times are GMT +1. The time now is 06:20 AM.

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

About Us

"It's about Microsoft Excel"