Wednesday, 26 February 2014

Keep leading Zeros

Add Leading Zeros to the Values :-

In many cases , Excel takes numeric code as numeric value and by default it removed leading zero from it. Example we have the original data as "001" EmpID and excel takes it as numeric value ie "1" removed leading zeros. So, here we have a simple formula to keep that leading zeros.

Formula : 
=REPT("0",3-LEN(A2))&A2

Another Formula :

=Text(B2,"000")

Please Note: 
While Entering the numeric text you could also use Single Quotation (') before Zero..

See below example :




Thank you !!




No comments:

Post a Comment