Hey guys,
I am trying to create unique SKUs for a data set I have. What I would like to accomplish is to create a new SKU for every new product. These SKUs should be numerical but I cannot use the drag tool or a basic formula because each product takes up anywhere between 2-50 rows. Each row may depict a different color/size but it is still the same product and needs the same SKU.
Example
E1-E5: "Writing Desk"
E6-E12: "Bookcase"
E13-E50: "Barstool"
Now what I want would be...
D1-D5: "SKU10001"
D6-D12: "SKU10002"
D13-D50: "SKU10003" and so on...
I tried coming up with a COUNTIF formula but to no avail. Ideas I have about how to do it would be If E2=E1, don't count up. If E2≠E1, count. That way it checks the cell above. If the cell above is the same it doesn't count up, if the cell above is different (meaning a change in product), the SKU will count up by 1.
in d1 put
sku10001
in d2
put
="sku"&IF(E2=E1,RIGHT(D1,5),RIGHT(D1,5)+1) drag down
Last edited by martindwilson; 07-19-2011 at 05:20 PM.
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
FANTASTIC!
Martin, thank you kind sir.
And for others who may use this after, in d1 put "SKU10001" with no = sign. That messed me up for a few minutes.
oops a typo
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks