+ Reply to Thread
Results 1 to 7 of 7

next higher number row

  1. #1
    Registered User
    Join Date
    01-20-2010
    Location
    bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    49

    next higher number row

    Hi
    in the column A I have some numbers eg. 3,3.25,3.25,3.5,4,4,4,4.25,4.25,4.5,4.75,4.75,4.75,5
    I want to use B1 as input , where user can input any number from Column A
    Now I want that in B2 the result will be as the next higher number from Column A

    eg.
    1. If B1 = 3 then B2=3.25
    2. If B1=3.25 then B2=3.5
    3. If B1=4 then B2=4.25

    I is possible without macro ?? if possible then plz help me

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: next higher number row

    Try this...

    =IFERROR(INDEX(A1:A14,MATCH(B1,A1:A14,0)+1),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-20-2010
    Location
    bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: next higher number row

    no, its not working. If I give 3 in B1 then its working. But if put 3.25 it is giving 3.25

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: next higher number row

    Ooops!

    I just noticed there were duplicate numbers.

    Data Range
    A
    B
    1
    3
    3.25
    2
    3.25
    3.5
    3
    3.25
    4
    3.5
    5
    4
    6
    4
    7
    4
    8
    4.25
    9
    4.25
    10
    4.5
    11
    4.75
    12
    4.75
    13
    4.75
    14
    5
    15
    ------
    ------


    Try this array formula**:

    =IFERROR(1/(1/MIN(IF(A1:A14>B1,A1:A14))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  5. #5
    Registered User
    Join Date
    01-20-2010
    Location
    bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: next higher number row

    excellent, thnx

  6. #6
    Registered User
    Join Date
    01-20-2010
    Location
    bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: next higher number row

    But can u give me explanation plz I will be glad to u

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: next higher number row

    =IFERROR(1/(1/MIN(IF(A1:A14>B1,A1:A14))),"")

    If there are no numbers greater than the lookup value then the MIN function will return 0.

    You don't want a result of 0 so I intentionally wrote the formula so that it will cause an error to be generated if there are no numbers greater than the lookup value. But, we then use the IFERROR function to trap that error.

    We can say that 1 divided by 1 divided by some number will equal that number UNLESS that number is 0. When the number is 0 the division operations will result in the #DIV/0! error.

    For example:

    If the result of:

    MIN(IF(A1:A14>B1,A1:A14)) = 3.25

    Then:

    1/(1/MIN(IF(A1:A14>B1,A1:A14))) = 3.25

    Then:

    =IFERROR(3.25,"") = 3.25

    However, if there are no numbers greater than the lookup value the result of:

    MIN(IF(A1:A14>B1,A1:A14)) = 0

    Then:

    1/(1/MIN(IF(A1:A14>B1,A1:A14))) = #DIV/0!

    Then:

    =IFERROR(#DIV/0!,"") = "" (blank)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 13
    Last Post: 08-13-2013, 12:51 PM
  2. Replies: 7
    Last Post: 03-22-2010, 05:22 PM
  3. get first higher number
    By Coaster in forum Excel General
    Replies: 9
    Last Post: 04-08-2009, 01:55 AM
  4. second higher number
    By HR157 in forum Excel General
    Replies: 1
    Last Post: 01-26-2007, 04:29 PM
  5. [SOLVED] comparing a value in a cell to see if it is higher than a number
    By PK in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

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