Excel knowledge, programming knowledge, scripting knowledge - novice, beginner level.
I'm using Excel 2016, Windows 10. And I need to create some SKU numbers. The ask is to be able to auto increment my SKU in the column A by 1.
My SKU pattern is MPSK-00001-001. The prefix of the pattern is constant "MPSK". I only interested in increment the middle part of the pattern the "00001" portion of the pattern, not the suffix of the pattern at this time. The dashes are part of the pattern and must be retained. And finally must retain leading zeros, padding zeros.
The datasheet that I have in Excel I can not add more columns. So I need to apply the formula starting from column N, and carry it forward to however far I need to drag it down in the future as the list grows. And the kicker is that I only need a SKU number created if there is a description in column D, non-blank in column D. Meaning not every row in my excel file needs to have a SKU added.
So I filtered column D to exclude blanks. And I applied this formula to column N ="MPSK-"&TEXT(ROWS(1:$2),"
001" ... which didn't give me the results I was seeking though I think I am close maybe? Image of result attached.
Desired output would be where column D isn't blank to increment the SKU value in column N by 1.
row 1, column N contains MPSK-00001-001
if column D isn't blank then column N ....MPSK-00002-001
if column D isn't blank then column N ....MPSK-00003-001
if column D isn't blank then column N ....MPSK-00004-001
if column D isn't blank then column N ....MPSK-00005-001
Note: that in my print screen examples there appears to be (5) rows related to each product that requires a SKU, this is just due to the subset I grabbed the screenshot. The attributes/rows between products can vary, it is not a constant (5) rows ... hopefully that makes sense.
Thanks in advance for the assistance.