ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do you stop excel removing the leading zeros in a cell? (https://www.excelbanter.com/excel-discussion-misc-queries/144095-how-do-you-stop-excel-removing-leading-zeros-cell.html)

ck2007

How do you stop excel removing the leading zeros in a cell?
 
I need the leading zero to be actually in the cell so formatting the cell
using custom or special will not work as these seem to be for display only.
The cell cannot be formatted for text or you cannot put an apostrophe before
the number as the spreadsheet is read into a database table. The table field
is set up to take characters but does not accept anything with the green mark
in the top left of the cell.

Don Guillett

How do you stop excel removing the leading zeros in a cell?
 
try a custom format of 000000000000 for the number you want to the limit

--
Don Guillett
SalesAid Software

"ck2007" wrote in message
...
I need the leading zero to be actually in the cell so formatting the cell
using custom or special will not work as these seem to be for display
only.
The cell cannot be formatted for text or you cannot put an apostrophe
before
the number as the spreadsheet is read into a database table. The table
field
is set up to take characters but does not accept anything with the green
mark
in the top left of the cell.



CLM

How do you stop excel removing the leading zeros in a cell?
 
Add a column with formula of =text(b2,"000000000") zeros for the length you
want. This is not formatting, it changes it to text. It will show a green
mark in the top left but will not have an apostrophe. Copy and paste as
values over your original column and delete the new one.

"ck2007" wrote:

I need the leading zero to be actually in the cell so formatting the cell
using custom or special will not work as these seem to be for display only.
The cell cannot be formatted for text or you cannot put an apostrophe before
the number as the spreadsheet is read into a database table. The table field
is set up to take characters but does not accept anything with the green mark
in the top left of the cell.



All times are GMT +1. The time now is 04:27 PM.

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