+ Reply to Thread
Results 1 to 7 of 7

Choose the data from column A on condition in column B

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Hull, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    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!
    Last edited by AGA; 11-28-2010 at 07:51 PM. Reason: solved

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,474

    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
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    09-15-2010
    Location
    Hull, England
    MS-Off Ver
    Excel 2007
    Posts
    51

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

    Thanks Robert! It works!

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,474

    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. #5
    Registered User
    Join Date
    09-15-2010
    Location
    Hull, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Exclamation 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
    Attached Files Attached Files
    Last edited by AGA; 11-28-2010 at 07:26 PM. Reason: urgent neet for solution

  6. #6
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,474

    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).
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-15-2010
    Location
    Hull, England
    MS-Off Ver
    Excel 2007
    Posts
    51

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

    Thank you.
    I marked the post as 'solved'

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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