How to Build a Product Code (SKU) from Parts in Excel

Generate consistent SKUs like APP-JOG-M-014 from category, product, size and sequence columns — including items without a size.

You will learn to

  • Abbreviate parts with UPPER(LEFT())
  • Add a zero-padded sequence number
  • Skip empty parts with TEXTJOIN

How it works

A good SKU is short, consistent and readable: APP-JOG-M-014 tells a warehouse picker it is apparel, joggers, size M, item 14. Build it from your product columns: abbreviate text with =UPPER(LEFT(A2,3)), pad the sequence with TEXT(E2,"000") so codes stay the same length, and join the parts with "-".

Not every product has every attribute — a tote bag has no size. Joining with & would leave a double dash ("ACC-TOT--012"). TEXTJOIN with TRUE skips empty parts automatically: =UPPER(TEXTJOIN("-",TRUE,LEFT(A2,3),LEFT(B2,3),D2,TEXT(E2,"000"))). Check generated codes for duplicates with COUNTIF before using them.

=UPPER(LEFT(A2,3)&"-"&LEFT(B2,3))