# Choose the data from column A on condition in column B

1. ## Choose the data from column A on condition in column B

Hi!
I have data in two columns. Column A value and column B Code.
The first thing I do I use 3 the largest values from column A using formula LARGE, for example '=large(A2:A10,3)' gives me the 3rd largest value. In example below it is '23'.
I need a formula which will give code of the 3rd largest value, not the value it self. (in example 'f'.

Example:

value code
11 a
2 s
3 v
23 f
5 s
6 g
54 j
8 v
91 t

Thank you very much for your help!

PLEASE LOOK BELOW FOR ADDITIONAL ATTACHEMENT!

2. ## Re: Choose the data from column A on condition in column B

Hi AGA,

Try this:

=VLOOKUP(LARGE(A2:A10,3),A2:B10,2,FALSE)

HTH

Robert

3. ## Re: Choose the data from column A on condition in column B

Thanks Robert! It works!

4. ## Re: Choose the data from column A on condition in column B

You're welcome

If could mark the the thread as solved it would be appreciated.

Regards,

Robert

5. ## Re: Choose the data from column on condition in different column B

BUT,
When things get a little bit more complicated, the formula does not work.
I want to get code from column A for the top 3 values from columns d,e,f,g. Starting from column D, in cellD20 I want to get code 17-2.

Please find an excel sheet attached

6. ## Re: Choose the data from column A on condition in column B

BUT, When things get a little bit more complicated, the formula does not work
If you had posted the actual structure of your data I would have supplied a different formula to meet those needs, as I have done in the attached. Note if there's only two values a #NUM! error will result (which can be error trapped).

7. ## Re: Choose the data from column A on condition in column B

Thank you.
I marked the post as 'solved'

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1