I am looking to add "0" to the beginning of a number until there is a maximum of four digits. For example, 1 -> 0001, 40 ->0040, 623 ->0623. The current formula I have is as follows
Assuming I am looking in cell A1, I have
=IF(LEN(TRIM(A1))<4,REPT("0",4-LEN(TRIM(A1)))&A1,A1)
I have a cell that is "MK-20". How do I modify the formula to have the result be "MK-0020"? Essentially, I would like to apply the the formula after the "-". I know I parse out the data and work from there but I'd like to try to avoid that.
- James
Bookmarks