+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Finding the first value to meet my criteria

  1. #1
    Registered User
    Join Date
    12-08-2009
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Finding the first value to meet my criteria

    I have a range of numbers of that decrease from highest to lowest. I need to find the first number that is smaller than my reference number.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the first value to meet my criteria

    With
    A1:A10 containing numbers in descending order
    and
    B1 containing a reference number

    This formula returns the largest value int A1:A10 that is smaller that the B1 value.

    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    12-08-2009
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Finding the first value to meet my criteria

    This helps in most cases, but I do have some instances where some of the numbers in my array are equal to the reference number. The formula you submitted returns the first number that is less than or equal to the reference number. Any suggestions on how to fix this? Thanks.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Finding the first value to meet my criteria

    I'm not seeing that...

    Example:
    A1:A10 contains these values in descending order:

    Please Login or Register  to view this content.
    B1: (a reference value)

    Formula that returns the first value that is SMALLER than the B1 value

    Please Login or Register  to view this content.

    When...

    Please Login or Register  to view this content.

    Are you seeing something different?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Finding the first value to meet my criteria

    below not warranted unless there is duplicity of numbers...

    =LARGE(A1:A10,1+COUNTIF(A1:A10,">="&B1))

  6. #6
    Registered User
    Join Date
    12-08-2009
    Location
    Georgia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Finding the first value to meet my criteria

    I do have duplicate numbers but I was able to get both formulas to work. I got the INDEX formula to work by subtracting 0.001 from my reference number (B1-0.001). The LARGE formula worked as shown. Thanks for the help.

+ 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