Maintaining leading zeros in text

Example of Amazon ASIN/ISBN

0321914228 (turns to 321914228 while uploading as CSV)
1285165918 (right format)
013354642X (The ‘0’ stays on this while uploading as CSV - maintains right format despite leading zero)

The Field is set to text, I’d like to format all as “0000000000” Like Excel can do (Ten characters maintained)

Any Ideas appreciated. Thank you.

One way …

text:find & replace:truncated from end to 10

Set a regular expression,
pattern ^
replace 000000000

The ^ matches the start of the string, so in effect it prepends the zeroes into the text.

Maybe an unwanted side-effect, this does truncate anything longer than ten characters from the left side.

1 Like

Worked! No ASIN over 10 characters so all good

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.