Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.
Feb 28, 2022
I’m making course codes (like ACT015) from numbers (like 15) and prefixes like “ACT”. The trick is - how to left pad the numbers with 0 when combining them?
The part of the formula to add the right number of '0’s:
REPT(“0”, 3 - LEN(Number&""))
and the whole formula:
CONCATENATE(Prefix, REPT(“0”, 3 - LEN(Number&"")), Number)
Hope this helps someone! I didn’t see any other posts on the first page of results when I googled “airtable formula leftpad”, so had to get creative.