Dear everyone,

I would like to ask you one question that seems quite easy when seen, but for me, very hard to solve as I haven't found any formula solving it. Please help, if you know how to do it..Here it is. I have a sheet with product numbers (2000 - 3000). Some of them are repeating, some of them are not. I need to write in the column next to it a number like this: If there is one product number, write 1, if there is second one after, write 2 and so on.

It should look like this:

2001 1

2002 1

2003 1

2003 2

2003 3

2004 1

2005 1

2005 2

2005 3I very appreciate your help.

With kind regards,

Peter

Assuming your data starts in A1, try this formula. Note the placement of the dollar sign. As you drag the formula down, the top of the range stays constant but bottom will increase, thereby counting each occurrence the referenced value in the range above it.

=COUNTIF(A$1:A1,A1)

Ask Your Question

Weekly Poll

Would you use "Spotlight Search" on Windows?

Discuss in The Lounge

Poll History