# Applying Formula to assign numeric values to text values in sequential order

1. ## Applying Formula to assign numeric values to text values in sequential order

I want to achieve a similar objective, but when I insert the formula, it will not insert a number to a respective duplicate value.

After inserting the formula =if(COUNTIF(H\$2:H2,H2)=1,MAX(I\$1:I1)+1,VLOOKUP(H2,H\$1:I1,0,FALSE))

It returns:

H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I
Heat#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Blank)
HT 414... Unique~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1
HT D07... Unique~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2
HT C21... Unique~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3
HT 414... Duplicate of first Unique Value~~~~~~~~~~~~~~~~(Blank)
HT 234... Unique~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4

My question is how do I get the duplicates to show the value given to the original unique value so that, in this example, the second and subsequent HT 414... will show 1 and so on for all possible duplicates.

For instance, if HT C21 reappears, the adjacent cell will return "3"

2. ## Re: Applying Formula to assign numeric values to text values in sequential order

Try this...

=IF(COUNTIF(H\$2:H2,H2)=1,MAX(I\$1:I1)+1,MATCH(H2,H\$2:H2,0))

That did it!

Thanks

4. ## Re: Applying Formula to assign numeric values to text values in sequential order

You're welcome. Thanks for the feedback!

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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1