By: Shamima

In reply to Exceler.

Hi Exceler,

Here, I tried the first method for 50 sets of data and it worked but you have to change the cell references based on your dataset. For your better understanding, I am attaching the images along with the formula.
=INDEX($D$5:$D$30,MATCH(1,MMULT(--($B$5:$C$30=F5),TRANSPOSE(COLUMN($B$5:$C$30)^0)),0))

The images of datasets

Here, I used the formula for the entire dataset. I changed the references based on my dataset.

Output for 50 values:

Note: If your dataset is very large kindly send us your dataset

Thanks
Shamima Sultana