Generate SKU numbers for product list in Excel

D1XII

New Member
Joined
Oct 13, 2016
Messages
26
Hi Guys,

Total Newbie in Excel - but I can figure some things out.

I have a list of product categories structured like this:

Seasonal/Christmas/Trees/Ornaments/Red

I would like excel to generate numeric values for each category and a random value for each individual product. So

Seasonal = 4
Christmas = 52
Trees = 80
Ornaments= 01
Red = 7

Thus; the SKU = 45280017269, where 269 is the randomly generated product value.

I know there is a way and I'm sure it's easier than I think. Can any of you excel geniuses help me?

Thanks!
 
You're a genius!! Thank you!!

Now, the only issue is that if I wanted to quickly add more categories and products (like copy and paste a lot of them) it doesn't assign new values to those categories.

I'm not married to the numbers I entered earlier. Is there a way to generate values based off column A?

As I mentioned earlier, my recommendation would be to create a separate list (probably on a separate sheet) of the different values available in each category. Then, use VLOOKUP to pull up the corresponding number for each item.
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I created this SKU generator: https://s22.postimg.org/ar6mytyw1/SKU.jpg

In B2, use this formula: =VLOOKUP(C2,$I$3:$J$44,2,FALSE)&"-"&VLOOKUP(D2,$K$3:$L$44,2,FALSE)&"-"&VLOOKUP(E2,$M$3:$N$44,2,FALSE)&"-"&VLOOKUP(F2,$O$3:$P$44,2,FALSE)&"-"&VLOOKUP(G2,$Q$3:$R$44,2,FALSE)&"-"&INDIRECT("H"&ROW()+1)

Copy it down to the rest of cells of column B to create the unique SKU of each product.

The second table (columns I:R) is your category database which column B uses it to make the preferable SKU according to your data entry (categories and colours).

I hope I could help a little more.

EDIT: Another suggestion is, if you would like to avoid column H, replace "INDIRECT("H"&ROW()+1)" with this: "TEXT(ROW();"0000")". Using the Number of row is also a unique digit.
 
Last edited:
Upvote 0
I created this SKU generator: https://s22.postimg.org/ar6mytyw1/SKU.jpg

In B2, use this formula: =VLOOKUP(C2,$I$3:$J$44,2,FALSE)&"-"&VLOOKUP(D2,$K$3:$L$44,2,FALSE)&"-"&VLOOKUP(E2,$M$3:$N$44,2,FALSE)&"-"&VLOOKUP(F2,$O$3:$P$44,2,FALSE)&"-"&VLOOKUP(G2,$Q$3:$R$44,2,FALSE)&"-"&INDIRECT("H"&ROW()+1)

Copy it down to the rest of cells of column B to create the unique SKU of each product.

The second table (columns I:R) is your category database which column B uses it to make the preferable SKU according to your data entry (categories and colours).

I hope I could help a little more.

EDIT: Another suggestion is, if you would like to avoid column H, replace "INDIRECT("H"&ROW()+1)" with this: "TEXT(ROW();"0000")". Using the Number of row is also a unique digit.

This is brilliant, ChrisGT7.

I will try to replicate now. I got kind of close, but I think your way is much more fluid. Will report back - been up since yesterday trying to figure this out. I'm a designer - not a coder :eeek:. Thanks, again!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top