LEFT Function

Owen Smith
โญโญโญ
I want to add a "0" to the left of any number with just 5 digits and just duplicate any number with "H" in front.
Tags:
Best Answer
-
Ok. Let's try this instead:
=IF(LEFT([Column2]@row) = "H", [Column2]@row, "0" + [Column2]@row)
Answers
-
Try something like this...
=IF(LEN([Column2]@row) = 5, "0") + [Column2]@row
-
That works great for the example I provided. One exception and rather important that I failed to list, a standard five digit number could have an extension, like "XA", ie.45232XA, making length 7. I was working with contains to duplicate when includes a "H". Thank you for the quick reply.
-
Ok. Let's try this instead:
=IF(LEFT([Column2]@row) = "H", [Column2]@row, "0" + [Column2]@row)
-
Thank you Paul, I added the OR and it seems to work for all
Help Article Resources
Categories
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!