ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Inputting variable length data - outputting fixed character result (https://www.excelbanter.com/excel-discussion-misc-queries/163655-inputting-variable-length-data-outputting-fixed-character-result.html)

Webster

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?

Gary''s Student

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?


David Biddulph[_2_]

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?





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com