Take the 2-minute tour× user2259922 8 1 1 3 2 Answers barry houdini 20.6k 2 9 22 I r ecord the value of my stocks each day in columns and it is a long spreadsheet. In the top cell of each column, I want to use a function that will display the last entry in the column automatically. I've tried the Index function and the Index function combined with the Counta function with no success. Any suggestions? excel function asked Apr 9 '13 at 2:52 Hereis one approach; and hereis another. – chuffApr 9 '13 at 3:01 @chuff you should summarise the answ er from tha t first link into an answer here- it is the best answer to this question – chris neilsenApr 9 '13 at 7:52 Try using LOOKUP, assuming at most 1000 rows of data (adjust as required) use this formula in A1 to get the last number in A2:A1000 =LOOKUP(9.99E+307,A2:A1000) You canhave blanks or any other data in the range (even errors) and it will still return the last numberanswered Apr 9 '13 at 12:05 This worked perfectly - thank so much!! BTW, what does the 9.99E+307 d o? I ha ve never u sed this before. – user2259922 Apr 9 '13 at 14:27 No pr oblem - 9.99E+307 is a shortened version of the largest numb er you can type in a cell in Excel - technically it's 9.99999999999999E+307 which is just short of a 1 with 308 zeroes. When you use that "Bignum" as the lookup value excel won't find a number that large.....and consequently returns the lastvalue in the range - if it works for you can you accept my answer? – barry houdini Apr 9 '13 at 14:40Combination of MATCH/INDEX can be used to achieve the same result, with 9.99E+307 as the match lookup value. It may be worth mentioning that the result with either method is literallythe last number, i.e., any blank, text or error values that occur after the last numeric value will be ignored. – chuffApr 9 '13 at 18:15 Thanks aga in. This is the first time I've used stackoverflow, so I think I have now "accepted " your a nswer but feel free to let me know if I have not done that correctly. – user2259922 Apr 9 '13 at 20:52 Try this for Column A, resp. Cell A1: =OFFSET(A$2;ROWS(A$2:A$101)-COUNTBLANK(A$2:A$101)-1;0) This example is for a maximum of 100 rows of data (2 - 101). You may replace 101by any highernumber according to the size of your sheet. Please note that there may be noblank cells in the middle of the list. Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registrati on required. excel function to find last number in column sign up log in tourhelp careers 2.0