Assign a number to the different values

Copper Contributor

Hello guys, 

 

This is my first time here, and I am not an excel guru. I would like to use some help. I am not sure if that is the right subject for this but I attached the file. I am trying to assign a number to each cell, duplicate numbers are acceptable and should be assign the same number as the original.  start the process from the bottom or last cess and go up. I want to start with the number 1 on the last cell and move up to the top. 

 

Here is an example 

22222.   (2).  duplicate 

99999.    (7)

00000.    (3) Duplicate

44444.    (1) Duplicate 

34343   (6)

53433    (5)

66666.   (4)

00000   (3) 

22222.   (2)

44444.   (1)

6 Replies

@Marco365 

If you mean this range

image.png

in E1 it could be

=IF(D2="",IF(D1="","",1), IFNA(INDEX(E2:INDEX($E:$E,COUNTA($D:$D)),MATCH(D1,D2:INDEX($D:$D,COUNTA($D:$D)),0)),MAX(E2:INDEX($E:$E,COUNTA($D:$D)))+1))

in F1

=IF(ISNA(MATCH(D1,D2:INDEX($D:$D,COUNTA($D:$D)),0)),"","Duplicate")

and drag them down till end of the range or further.

@Sergei Baklan 

 

Wow, this is amazing. I think this is exactly what I needed. Knowledge is a powerful weapon. Thank you  from the bottom of my heart Mr. Baklan. 

 

I have a few other formulas that I have been working on and I have been going the long way. It takes forever. 

I will post as much as I can, but what is your suggestion on how to go about mastering excel or formulas? How do I find out the specifics I need to learn instead of the whole excel world? 

By the way, what is the name of this formula you created or under what category is it under? Yesterday I learned about ranks,  I have been watching a few videos on it so far. 

I am going to analyze the formula you sent, I see quite a bit of formula. Ill try to practice on it. Thanks again. 

@Marco365 

It's hard to say which way is better. If start with basics, it's worth in Excel in File->New search "tutorial" and check them. That's about a dozen of different tutorial files from Microsoft.

 

To solve concrete task try to google for something similar, you may find practically everything and different variants of the solution. Take as a pattern and since that's usually a combination of functions, google for another samples/tutorials for better understanding of first one.

 

In above formula are used dynamic ranges, e.g. A1:INDEX(A:A,COUNTA(A:A)) instead of A1:A400; value lookup as INDEX/MATCH and more simple MAX and MATCH.

NVM

@Marco365 This seems to be a continuation from the discussion you started earlier.

https://techcommunity.microsoft.com/t5/excel/sort-numbers-within-a-cell-in-excel/m-p/2080901