Retrieve data from Column A based on condition from Column B

Closed
ashjey29 Posts 2 Registration date Monday 23 November 2015 Status Member Last seen 22 January 2016 - 24 Nov 2015 à 01:41
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 1 Dec 2015 à 12:25
I have a set of data in a column. Say like below:

Col A Sets
Apple 1
Apple 1
Apple 1
Orange 2
Orange 2
Orange 2
Pear 3
Pear 3
Pear 3
Mango 4
Mango 4


I want to retrieve the value from col A based on unique values in column (Sets). For an example for sets =1 retrieve Apple. For sets =2 retrieve orange. For sets =3 retrieve pear. How do I do this using macro? Please help. Very much appreciated.

Thanks!
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
24 Nov 2015 à 21:12
if you flip the columns then you can use vlookup, else you have to use combination of indirect, address, and match
How do i do it using combination of indirect, address and match? i have huge amount of data to do this operation. Thanks.
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766 > ashjey29
1 Dec 2015 à 12:25
Then it would be expensive in term of performance. One alternate way would be to use a user defined formula or still most easy route would be to have column A, appear after the "Set" column