ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   padded leading 0 (https://www.excelbanter.com/excel-programming/316535-padded-leading-0-a.html)

tango

padded leading 0
 
dear all

this is to pad with trailing 0
=IF(D2<14, REPT("0",14-LEN(D2)&D2),D2)

why when i put in this way it doesn't seem to work?
=IF(D2<14, D2&REPT("0",14-LEN(D2)),D2)

thanks

Tom Ogilvy

padded leading 0
 
See answer to second posting of this question.

--
Regards,
Tom Ogilvy

"tango" wrote in message
om...
dear all

this is to pad with trailing 0
=IF(D2<14, REPT("0",14-LEN(D2)&D2),D2)

why when i put in this way it doesn't seem to work?
=IF(D2<14, D2&REPT("0",14-LEN(D2)),D2)

thanks





All times are GMT +1. The time now is 07:22 PM.

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