Hi All
I am wanting to use one formula to keep the alphabetical character but add leading zeros if the digits are less than 8.
For example A1234 must be converted to A0001234.
Many thanks, Nikki
Hi:
Try the following formula
Code:=IF(LEN(A1)-1<8,LEFT(A1,1)&REPT("0",8-(LEN(A1)-1))&RIGHT(A1,LEN(A1)-1))
Thanks
Hi Nikki,
One more solution, but array formula, so must be entered with Ctrl+Shift+Enter.
=LEFT(A1,MATCH(TRUE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)&TEXT(MID(A1,MATCH(TRUE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0),255),REPT(0,8-LEN(A1)+LEN(MID(A1,MATCH(TRUE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0),255))))
Regards,
Can you give some more examples of data?And what if I want result like below:
For example TAM/GBT/H/06587 must be converted to 8 digit GH006587.