Leading Zeros for Number Field

I need leading zeros for the Number field for shot lists for video. Leading zeros “1” would be written as “01” or “001”. This is useful for ordering files by name, inventory SKU’s, etc.

1 Like

Does it need to be a number type field? Can you use a text field instead? You can convert it back to a number later if needed.

In my view, the purpose of using a tool like Airtable is recognizing data for its particular function to harness it. Sure, I could use a text field. But then Airtable loses its powers and I might as well use Google Sheets instead. For example, if I want to number sequentially from 1 to 10, with a numbers field I can use the fill handle to do this within seconds, rather than manually filling out each field.

Airtable Support | Quickly filling cells using fill handle | Continuing a series of data

1 Like

I see what you are saying and I don’t disagree.

How do you do this in Google Sheets with the column formatted as a Number?

1 Like

Use a formula field to pad the number with leading zeros.

For example, if you want a total of three digits, and are sure that your initial number is three digits or less…

CONCATENATE(
  REPT(
    "0",
    3 - LEN({number} & "")
  ),
  {number}
)

I appreciate the suggestion. I input the formula as-is but am getting an error message:

Sorry, there was a problem saving this field. Unknown field names: number

Was I supposed to modify any words in the formula?

You need to replace {number} so that it matches the name of your field.

Thank you for clarifying, the formula now works! But I guess it’s dependent on the {X} column to produce the leading zero results.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.