How to number unique entry values in excel

  • Thread starter Thread starter lucien loyens
  • Start date Start date
L

lucien loyens

Can anyone tell me if there is a formula or code that will give me a
numbering for every unique entry in a column(Product):
Product Shop Numbering
apple grocer1 1
apple grocer2 2
pear grocer3 1
cherry grocer4 1
pear grocer1 2
pear grocer5 3
apple grocer6 3

The numbering column should be code or a formula.
Grocer5 is the number 3 that has pear in column A(Products)
Column C(Numbering) should automatically recognise this with formula
or code

Thanks

Lucien Loyens
 
Hello Lucien,

For the example you gave, it would be as simple as typing
the formula:
=COUNTIF(A$1:A2,A2)
into cell C2 and copying down, since you only seem to be
counting the number of occurrences (so far) of each type
of fruit.

If you need anything more complicated, you'll need to post
again with an example that shows what else you need.

Cheers
 
Back
Top