Solved

Retrieve lowest (furthest down) value in a column in Excel

Posted on 2011-02-17
7
1,022 Views
Last Modified: 2012-06-27
Hello,

In Excel (2007), what is the simplest single formula or combination of formulas which will retreive the lowest (furthest down) value in a colum?

For example, suppose that many but not all of the cells in the range A1:A999 contain values.  Moreover, suppose that you want a formula in cell A1000 which displays the value contained in the lowest cell in the column.  

BTW, lowest cell here does not mean the one with the lowest or minimum value but means:

>the cell which is the greatest number of rows from the column headings
>the cell you'd be in if, from A1000, you press Ctrl+UpArrow
>all cells between it and A1000 are empty.

Thanks

Sorry for the overblown definition of "lowest" but a bunch of definitions came to mind so take your pick!  LOL  

In fact, if you've got a better or goofier definition, it might add some levity to this otherwise very boring question -- so feel free!

0
Comment
Question by:Steve_Brady
7 Comments
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 34922788
Hello

In A1000 you can use

=index(A1:A999,match(99^99,A1:A999,1))

This is for numeric values. If the values are text, use

=index(A1:A999,match("zzzz",A1:A999,1))

cheers, teylyn
0
 
LVL 50

Expert Comment

by:teylyn
ID: 34922808
As for the terminology, "last populated cell in a range" springs to mind. Sounds pretty "geeky", but that's the jargon.
0
 

Author Comment

by:Steve_Brady
ID: 34922939
Thanks teylyn,

Geeky or not, it's a better and more specific than any of my definitions!

BTW, can you explain the arguments you used (99^99 & "zzzz") for the 1st term in =Match()?

Thanks
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 50

Expert Comment

by:teylyn
ID: 34923038
Sure.

The Match() function has this syntax: Match(what, where, how).

"what" and "where" should be self-explanatory, but note that the range defined with "where" can be only a one-column range or a one-row range, e.g. A1:A100 or A1:Z1.

"how" can either be -1, 0 or 1. If you don't specify it, Excel assumes 1.

0 will find only an exact match to "what". It will return #N/A if no match is found. The range can be in any order.

1 will find the largest value that is less than or equal to "what". For this to work in a range of values, the values need to be sorted in ascending order. For example a list of values is 0,5,10,15,20 in A1:A5 -- Using Match(7,A1:A5,1) will return 2 because 5 is the largest value in the range that is less than or equal to 7. 5 is in the second position of the range. (Remember, Match() returns the position of the value, not the value itself.

Imagine that Match() with 1 as the last parameter will assume the list is sorted ascending and will start the comparison with "what" at the last cell of the range.

Now, if the list is not sorted in ascending order and "what" is an impossibly large number like 99^99, then the last populated cell of the range is the cell that is less than or equal to "what". Excel expects the list to be sorted ascending, hence the position of in the last populated cell of the range must be the one to be returned. 99^99 is so big that it is very unlikely to be an actual value in the list.

The same principle applies to text value, where in an alphabetically sorted list, the last text value would sit before the text "zzzz".

I hope that makes it a bit clearer.

cheers, teylyn
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34923613
You can use this array formula for either numeric or text values

=INDEX($A$1:$A$999,MAX(IF(A1:A999="",0,ROW(A1:A999))))

To enter an array formula you have to press shift-ctrl-enter.

Saqib
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34925093
You can use LOOKUP formulas to do this Steve, i.e. for last numeric data

=LOOKUP(9.9E+307,A:A)

last text entry with

=LOOKUP(REPT("z",255),A:A)

or last entry, of whatever type with this version

=LOOKUP(2,1/(A:A<>""),A:A)

regards, barry
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34925587
Another one of Barry's Beauties.

Salute

Saqib
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
EXCEL Addin problem 7 27
TT Status Chang 3 33
Cells protection in Excel 7 23
Find missing excel values from Column A and B 4 20
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now