+ Reply to Thread
Results 1 to 4 of 4

How to conditionally extract cell data from an array

  1. #1
    Registered User
    Join Date
    01-30-2011
    Location
    NoVA
    MS-Off Ver
    Excel 2010
    Posts
    2

    How to conditionally extract cell data from an array

    Referring to the attached file, I want to compare the value in A1 to the column values (C1:G1), and use the highest valued column that does not exceed the value in A1 (in this case "30"). Then compare the value in A2 to the row values (B2:B6), and use the highest valued row that does not exceed the value of A2 (in this case "200"). At the intersection of the resultant column (30) and row (200), I want to copy the value to cell A3. In the attached example, I would expect the resultant to be "2".

    Thanks very much for any help you can offer.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to conditionally extract cell data from an array

    Use this in A3:

    =INDEX($C$2:$G$6, MATCH($A$2, $B$2:$B$6, 1), MATCH($A$1, $C$1:$G$1, 1))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-30-2011
    Location
    NoVA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to conditionally extract cell data from an array

    That's it! Thank you very much.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to conditionally extract cell data from an array

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to 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