ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Leading Zero with Function (https://www.excelbanter.com/excel-discussion-misc-queries/136354-re-leading-zero-function.html)

John Bundy

Leading Zero with Function
 
You need to add the zeroes with the test statement or format, her is an example
=LEFT(TEXT(A1,"00000"),3)

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"klmiura" wrote:

I have a column that displays zipcodes in the Zip Code format, but I am
trying to create a column to the left of that column that will display the
first three digits of the zip code and I am having issues bringing forward
the leading zeros. I have tried custom formatting and am using the following
formula to bring the first three digits over =LEFT(B4005,3); this formula
brings over the first three digits in all cases except the leading zeros. I
am at a loss. Any assistance would be greatly appreciated.

Karen



All times are GMT +1. The time now is 09:02 AM.

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