PDA

View Full Version : [SOLVED] Scoring data by finding duplicate names.



jun25
06-25-2014, 04:39 AM
hello experts,

I am writing to request a macro, which can find duplicate names and score them accordingly, based on the condition below:

Condition:
if name occurs more than 6 times/equal to 6 in sheet1, then place '3', under score in sheet2, else if name occurs more than 3 times /equal to 3 in sheet1, then place '2', under score in sheet2, and else if name duplicate is not found in sheet1, then score the name '1', in sheet2.

11868

I have attached example of the data and explained the logic in the above attachment, for further clarification.

Thanks for in advance for any assistance.

p45cal
06-25-2014, 05:06 AM
In cell H3 on Sheet2:
=VLOOKUP(COUNTIF(Sheet1!$A$2:$A$50001,Sheet2!$A3),{0,1;3,2;6,3},2,TRUE)
and copy down.
The 50001 will probably need adjusting to suit.

jun25
06-25-2014, 05:19 AM
This is great. Exactly what i was looking for. Many thanks for the amazing help.