How to number unique entry values in excel

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
 
M

macropod

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top