0

I'm probably approaching this wrong but I'm trying to automatically assign an ID to an item, I'd like the format to be C#### where #### starts with 0s and is assigned as 0001.

The expected output would be C0001, C0002, C0003... C9999

={"UID"; ARRAYFORMULA(if(D2:D="", "", ("C"&(text(row(D2:D)-1), "####"))))}

Without the text formatting, it has no issues assigning the first item as C1. If I assign the preceding 0's, it would generate as C0001... C00011 as opposed to C0011.

Thanks in advance for your help.

1 Answer 1

0

Instead of "####" use "0000"

Related

1
  • "0000" worked. Thanks!
    – Felix Pau
    Dec 18, 2019 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.