+ Reply to Thread
Results 1 to 6 of 6

Array lookup returning value equal or next greater depending on criteria (column)

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    6

    Array lookup returning value equal or next greater depending on criteria (column)

    Trying to determine future value based on given value (need to return the future value and "STEP")

    Lookup array of future value example: A1:E6

    STEP CAT1 CAT2 CAT3 CAT4
    1 475.66 586.33 956.48 962.11
    2 484.14 594.21 957.15 968.18
    3 494.78 595.89 958.79 979.01
    4 495.85 598.10 967.46 984.23
    5 502.59 599.45 985.22 998.36


    Lookup value: I need these values returned:
    Category Value F.Value STEP
    CAT1 483.15 494.78 3 - to lookup in CAT1 column only
    CAT3 954.66 956.48 1 - to lookup in CAT3 column only
    CAT4 983.56 984.23 4 - to lookup in CAT4 column only

    Help much much appreciated!

  2. #2
    Registered User
    Join Date
    07-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Array lookup returning value equal or next greater depending on criteria (column)

    Sample file attached...
    Attached Files Attached Files

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Array lookup returning value equal or next greater depending on criteria (column)

    FPS,

    Attached is a modified version of your sample workbook.
    In cell L2 and copied down is this formula:
    Please Login or Register  to view this content.

    In cell M2 and copied down is this formula:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    07-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Array lookup returning value equal or next greater depending on criteria (column)

    Awesome! That worked PERFECTLY! Thanks!

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Array lookup returning value equal or next greater depending on criteria (column)

    You're very welcome

    If that takes care of your need, please mark this thread as solved.
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  6. #6
    Registered User
    Join Date
    07-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Array lookup returning value equal or next greater depending on criteria (column)

    Addendum - the formula wasn't handling returned values for TOP row of lookup correctly. For example, if a future value should be CAT1, the returned value was CAT2 (since looking for the next greater value I guess.. the "+1" at the end of the formula.. if I removed the "+1" my returned values on other CATs were wrong. I adjusted by adding a row of 0's at the top of my lookup array - not elegant but it worked.

    I tried to add an IF stmt to check the current value against CAT1 value but messed up the forumula.. LOL

    I am satisfied with what I have. Thanks again tigeravatar!

+ 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