ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I display leading zeros so I can export a fixed in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/2865-how-do-i-display-leading-zeros-so-i-can-export-fixed-excel.html)

World Referee and accountant

How do I display leading zeros so I can export a fixed in Excel?
 
I need to export a file from Excel that has a fixed length of 18 digits, the
first 8 digits are account numbers the last 10 digits are the amounts. I
need the amount field to have a fixed length of 10 digits. I know I can use
the CONCATENATE command to add the account number to the amount but the
amount field doesn't have a fixed field length. The file is then exported
and is used to import data into some other application.

Ian Ripsher

"World Referee and accountant" <World Referee and
wrote in message
...
I need to export a file from Excel that has a fixed length of 18 digits,
the
first 8 digits are account numbers the last 10 digits are the amounts. I
need the amount field to have a fixed length of 10 digits. I know I can
use
the CONCATENATE command to add the account number to the amount but the
amount field doesn't have a fixed field length. The file is then
exported
and is used to import data into some other application.


Use Format Cells | Number | Custom and enter "000000000#" (without quotes)
in the Type box. The number will then show as padded with enough leading
zeroes to ensure it is displayed as 10 digits.



JE McGimpsey

If the Amounts are in column A and the account number is in D1, say, one
way:

B1: =D1 & TEXT(A1,"0000000000")

In article ,
"World Referee and accountant" <World Referee and
wrote:

I need to export a file from Excel that has a fixed length of 18 digits, the
first 8 digits are account numbers the last 10 digits are the amounts. I
need the amount field to have a fixed length of 10 digits. I know I can use
the CONCATENATE command to add the account number to the amount but the
amount field doesn't have a fixed field length. The file is then exported
and is used to import data into some other application.



All times are GMT +1. The time now is 10:25 PM.

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