Counting in groups or bunches

1. Counting in groups or bunches

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.

2. Re: Counting in groups or bunches

in d1 put
sku10001
in d2
put
="sku"&IF(E2=E1,RIGHT(D1,5),RIGHT(D1,5)+1) drag down

3. Re: Counting in groups or bunches

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.

4. Re: Counting in groups or bunches

oops a typo

There are currently 1 users browsing this thread. (0 members and 1 guests)