Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

How to retrieve last date and amount from columns?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tfrentz - 29 Oct 2006 21:31 GMT
Hi,

I have a spreadsheet with dates and amounts in columns A and B.  I want to
retrieve the last date and amount in both columns right before the empty
cells.  The dates are in ascending order and there are spaces in some rows
and some of the amounts can be spaces or zero.

Here is an example

Column A   Column B
....other data here
...spaces here
01/01/2001    0
01/02/2001    5000
01/01/2002    10000
01/01/2003    20000
01/01/2004    25000
01/01/2005    0
...spaces here
10/27/2006    30000
10/28/2006    35000
...empty cells here

I want to retrieve the the last row which contains the date of 10/28/2006
and the amount of 35000 into two cells adjacent to each other just like they
are stored in column A and B of the table above.

Any help greatly appreciated.
Ragdyer - 29 Oct 2006 21:49 GMT
Enter this anywhere, in a cell formatted to a date format of your choice:

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

And then simply copy it across to the next column to get the last value in
Column B.

Signature

HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

> Hi,
>
[quoted text clipped - 24 lines]
>
> Any help greatly appreciated.
tfrentz - 29 Oct 2006 23:41 GMT
Hi,

Thanks, that worked, but I guess I didn't explain myself completely as my
intention was to be able to add data to the columns in the future.  Can the
formula's range be modified to handle the whole column?  That way I won't
have to manually adjust the ranges in the future.  I tried making the range
A:A, which no success.

Also, could you explain what the parameters of the function mean?

thanks

> Enter this anywhere, in a cell formatted to a date format of your choice:
>
[quoted text clipped - 32 lines]
> >
> > Any help greatly appreciated.
Fred Smith - 30 Oct 2006 00:19 GMT
Vlookup will do what you want, as in:

=vlookup(999999999999,A:B,1)  where 999999999 is greater than any value in
column A
=vlookup(999999999999,A:B,2) will pick up the adjacent column

Signature

Regards,
Fred

> Hi,
>
[quoted text clipped - 44 lines]
>> >
>> > Any help greatly appreciated.
tfrentz - 30 Oct 2006 01:44 GMT
Hi Fred,

That worked great.  Thanks.

> Vlookup will do what you want, as in:
>
[quoted text clipped - 50 lines]
> >> >
> >> > Any help greatly appreciated.
Ragdyer - 30 Oct 2006 04:49 GMT
To reference the entire column, you might try this:

=LOOKUP(99^99,A:A)

Signature

HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

> Hi Fred,
>
[quoted text clipped - 58 lines]
> > >> >
> > >> > Any help greatly appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.