Two sets of generated task numbers based on Prefix

Hello,

I have a sheet that is tracking submitted occurrence reports. I need the numbers to be sequential for two different prefixes OR- and SAFOR-. Example OR-1000, OR-1001, OR-1002 AND SAF-1000, SAF-1001, SAF-1002. I don't think I can do this with an auto-number column, but any suggestions on how to do this?

Thanks,

Ashley

Best Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    You would use an auto-number column, but you would have it set up with no modifications. You want it to just output numbers.

    From there you would use a text/number column with a formula to generate your IDs. It would start with an IF statement to determine which prefix

    =IF(this = something, "OR-", "SAFOR-") +

    Then a COUNTIFS to get your incrementation.

    =IF([Column Name]@row = "something", "OR-", "SAFOR-") + (1000 + COUNTIFS([Column Name]:[Column Name], @cell = [Column name]@row, [Auto-Number]:[Auto-Number, @cell <= [Auto-Number]@row))

  • Ashley McAdoo
    Ashley McAdoo ✭✭✭✭✭
    Answer ✓

    Thank you, I have it working now. I appreciate the help!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!