samedi 14 avril 2018

Excel, Frequent string value with IF condition

I would like to find the modal area code for each ID number in excel. I have 2 columns

ID no.            Area Code
1                 ABC
1                 ABC
1                 ABC
1                 DEF
2                 HIJ
2                 HIJ
2                 KLM

So far I am finding the mode of the whole column using:

=(INDEX(B:B,MODE(MATCH(B:B,B:B,0))))

But I would like all ID no. 1 area codes to be ABC and ID no. 2 to be HIJ

Any advice would be great! Thanks

Aucun commentaire:

Enregistrer un commentaire