Dealing with duplicates

Deleted
Not applicable
Hi everyone.
Can you help me with this problem?
For example my data set looks like this. I have two columns.
Name Group
Maria 1
Maria 2
Luna 2
Luna 2
Paul 1
Paul 1

If the same name appears twice and is a member both groups (e.g. Maria), the student is labelled as belonging to Group 1. So I need to add another column indicating the final group membership.

Name Group_final
Maria 1
Maria 1
Luna 2
Luna 2
Paul 1
Paul 1

Thanks.
1 Reply
Suppose your data is in A2:A7 then this formula in C2 will list the group that is entered next to the first time a name is in the list:
=VLOOKUP(A2,$A$2:$B$7,2,FALSE)
For this to work, sort your table (using a custom sort), first on column A, then on column B. This ensures the groups are in ascending order for each name.