#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default Latest Result

I hav a large array of data taking the format similar to below

Date Field Result
01/02/2008 Field 1 56
03/06/2007 Field 4 34
04/08/2008 Field 3 45
06/09/2008 Field 4 78
08/04/2007 Field 5 27
09/12/2006 Field 2 59

The dates are ongoing and a field may have a result covering one or more years and dates.
What I want to do is to enter Field 4 for example and get the latest result (78) for that.
This should also work if there is only one result for a field, and over the years there
may be three or four results for one field but I just want the latest. I thought MAX would
get the latest date but I cannot tie it together with the field name. Sorry dates are UK
format. I would value any guidance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default Latest Result

Many thanks Don. I would never have worked that one out myself. Your help is much appreciated.

Graha

Don Guillett wrote:
One way with an array formula that must be entered using ctrl+shift+enter
=INDEX(K:K,MATCH(MAX(IF($J$2:$J$22="field 4",$F$2:$I$22)),K:K))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Latest Result

Try this *array* formula, with criteria (field 4) entered in D1:

=INDEX(C2:C7,MATCH(MAX((B2:B7=D1)*A2:A7),A2:A7,0))

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually.
You *must also* use CSE when revising the formula.


--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Graham H" wrote in message
...
I hav a large array of data taking the format similar to below

Date Field Result
01/02/2008 Field 1 56
03/06/2007 Field 4 34
04/08/2008 Field 3 45
06/09/2008 Field 4 78
08/04/2007 Field 5 27
09/12/2006 Field 2 59

The dates are ongoing and a field may have a result covering one or more

years and dates.
What I want to do is to enter Field 4 for example and get the latest

result (78) for that.
This should also work if there is only one result for a field, and over

the years there
may be three or four results for one field but I just want the latest. I

thought MAX would
get the latest date but I cannot tie it together with the field name.

Sorry dates are UK
format. I would value any guidance.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default Latest Result

Many thanks for that Ragdyer it fits the bill perfectly, much appreciated.

Ragdyer wrote:
Try this *array* formula, with criteria (field 4) entered in D1:

=INDEX(C2:C7,MATCH(MAX((B2:B7=D1)*A2:A7),A2:A7,0))



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Latest Result

You're welcome, and appreciate the feed-back.
--

Regards,

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

"Graham H" wrote in message
...
Many thanks for that Ragdyer it fits the bill perfectly, much appreciated.

Ragdyer wrote:
Try this *array* formula, with criteria (field 4) entered in D1:

=INDEX(C2:C7,MATCH(MAX((B2:B7=D1)*A2:A7),A2:A7,0))



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Latest Result

If your dates are in ascending order then all you need to do if find the
last instance of the field and it will correspond to the latest date:

Dates in column A
Field in column B
Result in column C

E1 = Field 4

=LOOKUP(2,1/(B2:B7=E1),C2:C7)

--
Biff
Microsoft Excel MVP


"Graham H" wrote in message
...
I hav a large array of data taking the format similar to below

Date Field Result
01/02/2008 Field 1 56
03/06/2007 Field 4 34
04/08/2008 Field 3 45
06/09/2008 Field 4 78
08/04/2007 Field 5 27
09/12/2006 Field 2 59

The dates are ongoing and a field may have a result covering one or more
years and dates. What I want to do is to enter Field 4 for example and get
the latest result (78) for that. This should also work if there is only
one result for a field, and over the years there may be three or four
results for one field but I just want the latest. I thought MAX would get
the latest date but I cannot tie it together with the field name. Sorry
dates are UK format. I would value any guidance.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 56
Default Latest Result

Many thanks for that approach which brings a different perspective on how to handle the
problem. Your help is much appreciated.

Graham

T. Valko wrote:
If your dates are in ascending order then all you need to do if find the
last instance of the field and it will correspond to the latest date:

Dates in column A
Field in column B
Result in column C

E1 = Field 4

=LOOKUP(2,1/(B2:B7=E1),C2:C7)

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Latest Result

You're welcome!

--
Biff
Microsoft Excel MVP


"Graham H" wrote in message
...
Many thanks for that approach which brings a different perspective on how
to handle the problem. Your help is much appreciated.

Graham

T. Valko wrote:
If your dates are in ascending order then all you need to do if find the
last instance of the field and it will correspond to the latest date:

Dates in column A
Field in column B
Result in column C

E1 = Field 4

=LOOKUP(2,1/(B2:B7=E1),C2:C7)



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
Latest LOOKup shaqil Excel Worksheet Functions 1 November 14th 07 11:24 AM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM
Excel2000: The latest value Arvi Laanemets Excel Worksheet Functions 5 November 30th 05 01:39 PM
Lookup the latest date in a range so it appears as my result FBB Excel Discussion (Misc queries) 1 December 4th 04 03:50 AM


All times are GMT +1. The time now is 02:23 AM.

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

About Us

"It's about Microsoft Excel"