Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default look up maximum date in a range

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005 and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default look up maximum date in a range

=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

Hank ezt *rta:

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005 and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default look up maximum date in a range

=MAX(--(A2:A5="001")*C2:C5)

Since you're multiplying the boolean result (A2:A5="001") by the date (a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt rta:

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default look up maximum date in a range

Thanks Stefi, I tried and it returned the result exactly same value as End
date, it actually didn't perform comparison.


Lease # Start date End date RESULT
(=MAX(--(A2:A5="001")*C2:C5))
001 2/1/2002 1/31/2005 1/31/2005
001 2/1/2005 1/31/2008 1/31/2008
002 1/1/2006 4/30/2009 4/30/2009
002 5/1/2009 10/31/2012 10/31/2012

it is not what I want to come up... ?
Hank



"Stefi" wrote:

=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

Hank ezt *rta:

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005 and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default look up maximum date in a range

Hi Biff

I tried your formula as well =MAX(IF(A2:A5000="001",C2:C5000))
it comes up the maximum of column of "end date" which is 10/31/2012,
regardless lease #

It is not what I want to get... can u please help me more?
Thanks
Hank




"T. Valko" wrote:

=MAX(--(A2:A5="001")*C2:C5)


Since you're multiplying the boolean result (A2:A5="001") by the date (a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt *rta:

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default look up maximum date in a range

All of the formulas suggested are array formulas.

Array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Hank" wrote in message
...
Hi Biff

I tried your formula as well =MAX(IF(A2:A5000="001",C2:C5000))
it comes up the maximum of column of "end date" which is 10/31/2012,
regardless lease #

It is not what I want to get... can u please help me more?
Thanks
Hank




"T. Valko" wrote:

=MAX(--(A2:A5="001")*C2:C5)


Since you're multiplying the boolean result (A2:A5="001") by the date (a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt rta:

Hi there,

I have a few lease contracts, they have different lease periods, some
of
them has different renewal terms. I would like to look up the latest
date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between
1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank







  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default look up maximum date in a range

Thanks Biff, I never used array formula before, it certainly work by hit crtl
shift enter. Thanks for your help... Also I come up another solution by use
lookup and max together. =MAX(LOOKUP(A4,A:A,C:C)) A4 is lease #, AA is lease
# column and CC is end date column, it comes the same result.

Hank

"T. Valko" wrote:

All of the formulas suggested are array formulas.

Array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Hank" wrote in message
...
Hi Biff

I tried your formula as well =MAX(IF(A2:A5000="001",C2:C5000))
it comes up the maximum of column of "end date" which is 10/31/2012,
regardless lease #

It is not what I want to get... can u please help me more?
Thanks
Hank




"T. Valko" wrote:

=MAX(--(A2:A5="001")*C2:C5)

Since you're multiplying the boolean result (A2:A5="001") by the date (a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt *rta:

Hi there,

I have a few lease contracts, they have different lease periods, some
of
them has different renewal terms. I would like to look up the latest
date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between
1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank








  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default look up maximum date in a range

=MAX(LOOKUP(A4,A:A,C:C))

You don't need the MAX function:

=LOOKUP(A4,A:A,C:C)

Just be careful with that. It will do what you want as long as the data in
column A is sorted in ascending order *and* there is always an exact match
of the lookup value.

--
Biff
Microsoft Excel MVP


"Hank" wrote in message
...
Thanks Biff, I never used array formula before, it certainly work by hit
crtl
shift enter. Thanks for your help... Also I come up another solution by
use
lookup and max together. =MAX(LOOKUP(A4,A:A,C:C)) A4 is lease #, AA is
lease
# column and CC is end date column, it comes the same result.

Hank

"T. Valko" wrote:

All of the formulas suggested are array formulas.

Array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Hank" wrote in message
...
Hi Biff

I tried your formula as well =MAX(IF(A2:A5000="001",C2:C5000))
it comes up the maximum of column of "end date" which is 10/31/2012,
regardless lease #

It is not what I want to get... can u please help me more?
Thanks
Hank




"T. Valko" wrote:

=MAX(--(A2:A5="001")*C2:C5)

Since you're multiplying the boolean result (A2:A5="001") by the date
(a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt rta:

Hi there,

I have a few lease contracts, they have different lease periods,
some
of
them has different renewal terms. I would like to look up the
latest
date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008
(that's
compare two end date in lease 001 in maximum end date between
1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank










  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default look up maximum date in a range

Thanks for your advices!
Stefi


T. Valko ezt *rta:

=MAX(--(A2:A5="001")*C2:C5)


Since you're multiplying the boolean result (A2:A5="001") by the date (a
number) C2:C5 you don't need the double unary "--".

=MAX((A2:A5="001")*C2:C5)

On large ranges it's slightly more efficient to use the IF version:

=MAX(IF(A2:A5000="001",C2:C5000))

--
Biff
Microsoft Excel MVP


"Stefi" wrote in message
...
=MAX(--(A2:A5="001")*C2:C5)
It's an array formula, confirm it with Ctrl+Shift+Enter!

Adjust ranges and Lease # constant as required!

Regards,
Stefi

"Hank" ezt *rta:

Hi there,

I have a few lease contracts, they have different lease periods, some of
them has different renewal terms. I would like to look up the latest date
in
a lease, such as

Lease # Start date End date
001 2/1/2002 1/31/2005
001 2/1/2005 1/31/2008
002 1/1/2006 4/30/2009
002 5/1/2009 10/31/2012

I need a formula to come up lease 001's end date is 1/31/2008 (that's
compare two end date in lease 001 in maximum end date between 1/31/2005
and
1/31/2008)
002's end date is 10/31/2012

Thanks alot and have a great weekend

Hank





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup Maximum between Range of Dates John Taylor Excel Discussion (Misc queries) 2 January 31st 08 10:58 PM
maximum over a non continuous range david Excel Worksheet Functions 6 October 2nd 07 04:14 PM
maximum number from a text range Cumberland Excel Worksheet Functions 2 April 27th 06 09:13 AM
vlookup maximum cell range? Fred Excel Discussion (Misc queries) 3 April 3rd 06 07:46 PM
How do I get the maximum absolute value of a range of numbers? biscuitsmom Excel Discussion (Misc queries) 2 January 19th 06 07:55 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"