+ Reply to Thread
Results 1 to 7 of 7

Check if value has been exceeded

  1. #1
    Registered User
    Join Date
    03-03-2009
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    44

    Check if value has been exceeded

    Dear All,

    I have a problem:
    I have an array that contains data (in a single row)
    I have a number in another field
    Now I would like to know which number in the array is bigger than the number specified in the field

    I tried MATCH function but it does not work
    like: =MATCH(M3;B5:H5;-1)
    M3=50
    B5:H5 contains two numbers: 10 and 55
    the result of the formula is error #N/A while it should give 4 as 55 is in the fourth cell in the array

    Could you please advise?

    Many thanks

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Check if value has been exceeded

    Hello,

    M5:H5 are seven cells. You only specified 2 values, 10 and 55. You did not specify in which cells these two values actually reside. Therefore it is not obvious that the "correct" result of the Match() function should be a 4 (which would be cell E5. What's in F5, G5 and H5?)

    I have about a dozen questions, which could be easily answered if you posted a workbook with your data layout and the context.

    Please do so, because it will be so much easier to analyse the issue and come up with a suggestion.

    cheers,

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Check if value has been exceeded

    B5:H5 must be sorted descending for that to work
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    03-03-2009
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Check if value has been exceeded

    Please find the workbook attached

    Many thanks!!

    ps. values cannot be sorted, the original order is needed
    Attached Files Attached Files

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Check if value has been exceeded

    well it wont work then!

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Check if value has been exceeded

    try this array formula

    =MIN(IF(B5:H5>M3,COLUMN(B5:H5)-1,""))

    you need to confirm it with CTRL-SHIFT-ENTER

    It will tell you the position of the smallest number that is greater than the value in M3.

    So, if E5=55 and F5=66, the result will be 4, because E5 is the smallest number that is greater than the 50 in M3.

    cheers,
    Last edited by teylyn; 06-24-2011 at 08:20 AM.

  7. #7
    Registered User
    Join Date
    03-03-2009
    Location
    Budapest
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Check if value has been exceeded

    Thank you very much, it works really well!!

+ 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