Excel find last value :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

find last value
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

mcarter973
Board Regular


Joined: 25 Mar 2002
Posts: 64


Status: Offline

 Reply with quote  

is there an excel formula for determining the last value entered in a range (column of data) or can the answer only be achieved thru writing code?

thanks

Post Thu Aug 29, 2002 4:00 pm 
 View user's profile Send private message Send e-mail

Cam
Board Master


Joined: 30 May 2002
Posts: 129
Location: Canada
Flag: Canada

Status: Offline

 Reply with quote  

=lookup(9.99999999999999E+307,A:A)

This will return the last numeric entry in column A



_________________
Cam B.

Post Thu Aug 29, 2002 4:07 pm 
 View user's profile Send private message Send e-mail MSN Messenger

mcarter973
Board Regular


Joined: 25 Mar 2002
Posts: 64


Status: Offline

 Reply with quote  

thanks cam - that did the trick.

Post Thu Aug 29, 2002 4:18 pm 
 View user's profile Send private message Send e-mail

Ekim
Board Master


Joined: 01 Jul 2002
Posts: 981
Location: Perth, Australia
Flag: Australia

Status: Offline

 Reply with quote  

If your data is in say B5:B50 -

To find the last number:

=INDEX(B5:B50,MATCH(9.99999999999999E+307,B5:B50))

or

=INDEX(B:B,MATCH(9.99999999999999E+307,B:B))


If your range includes text (or a mixture of numbers and text) use:

=INDEX(B5:B50,COUNTA(B5:B50),1)


Regards

Mike

Post Thu Aug 29, 2002 4:31 pm 
 View user's profile Send private message

Aladin Akyurek
.


Joined: 15 Feb 2002
Posts: 13645
Location: The Hague
Flag: Blank

Status: Offline

 Reply with quote  


quote:

On 2002-08-29 12:31, Ekim wrote:
If your data is in say B5:B50 -

To find the last number:

=INDEX(B5:B50,MATCH(9.99999999999999E+307,B5:B50))

or

=INDEX(B:B,MATCH(9.99999999999999E+307,B:B))


If your range includes text (or a mixture of numbers and text) use:

=INDEX(B5:B50,COUNTA(B5:B50),1)


Regards

Mike



The last one won't work when you have blanks interspersed with mixed data.


[ This Message was edited by: Aladin Akyurek on 2002-08-29 12:42 ]

Post Thu Aug 29, 2002 4:40 pm 
 View user's profile Send private message

XL-Dennis
.


Joined: 28 Jul 2002
Posts: 1629
Location: Östersund, Sweden
Flag: Sweden

Status: Offline

 Reply with quote  

mcarter973,

If there exist no empty cells in the range then following will work:

=INDEX(A:A,COUNTA(A:A))

If there exist empty cells then following array-formula will find the last value:
{=INDEX(A:A,MAX(ROW(1:1000)*(A1:A1000>0)))}

(You use Ctrl+Shift+Enter when entering this formula and XL will add the brackets.)

If You´re not comfortable with array-formulas following non-array formula will also find the last value:
=OFFSET(A1,MATCH(MAX(A1:A1000)+1,A1:A1000)-1,0)

You may need to adjust the width of the range, i e change A1000.

Kind regards,
Dennis



_________________
Gone fishing

Post Thu Aug 29, 2002 6:39 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.