Solved

Finding next highest number in a list against a number in a cell

Posted on 2014-02-11
12
298 Views
Last Modified: 2014-03-28
I have a list of numbers. I also have a cell that generates a number from elsewhere. I want to select the next highest number above the number in the cell, from my list.
Can someone assist? I cannot seem to find an easy solution.
0
Comment
Question by:BlosMusic
  • 2
  • 2
  • 2
  • +2
12 Comments
 
LVL 23

Expert Comment

by:Eirman
ID: 39850417
In principle, create a new list of numbers which would be your existing list less your test number. Then use the MIN function on the new list.
0
 
LVL 81

Expert Comment

by:byundt
ID: 39850425
So the desired result is a number larger than the one in the cell? In particular, the smallest such number?

If you have Excel 2010 or later, you can use the AGGREGATE function in a formula like:
=AGGREGATE(15,6,A1:A23/(A1:A23>D4),1)

In the above formula, A1:A23 is the list of numbers and D4 is the cell that generates a number from elsewhere.
0
 
LVL 23

Expert Comment

by:Eirman
ID: 39850434
Going back to my original suggestion, If your new list is in B1:B50 your answer would be
=MIN(B1:B50)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 81

Assisted Solution

by:byundt
byundt earned 125 total points
ID: 39850441
If you have Excel 2007 or earlier, you can use the array-entered formula:
=MIN(IF(A1:A23>D4,A1:A23,""))

To array-enter a formula:
1.  Select the cell and click in the formula bar
2.  Hold the Control and Shift keys down
3.  Hit Enter, then release all three keys
Excel should respond by adding curly braces { } surrounding your formula. If you don't see them (or if you see #VALUE! error value), then repeat steps 1-3.

The attached file shows both AGGREGATE and array-entered formulas.
SmallestAboveQ28361940.xlsx
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39850447
=LARGE(A1:A500, 5)
returns to 5th largest value in range selected
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39850479
ooopss to many posts sorry
0
 

Author Comment

by:BlosMusic
ID: 39850537
Hey everyone - what a quick response! I will go through this later - brilliant ideas out there!
Thanks. Will check back later.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 125 total points
ID: 39850573
Using byundt's setup you can also use this non-array formula to get the next highest number after D4

=LARGE(A1:A23,COUNTIF(A1:A23,">"&D4))

regards, barry
0
 

Author Comment

by:BlosMusic
ID: 39851020
Barry,
That works perfectly! Now I have to educate myself and find out why!
Many thanks all.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question