Solved

formula for a lookup based on the max value of a looked-up range

Posted on 2013-01-10
4
245 Views
Last Modified: 2013-01-11
can someone please help me with the following formula,

get the max value in a column based on a code, then do a lookup for value of another column

example attached

thank you very much
example.xlsx
0
Comment
Question by:newparadigmz
4 Comments
 
LVL 23

Assisted Solution

by:NBVC
NBVC earned 100 total points
ID: 38764144
Try:

=INDEX(Table92[ResultDate],MATCH(G6&"_"&MAX(IF(Table92[code]=G6,Table92[LookupDate])),Table92[code]&"_"&Table92[LookupDate],0))

Open in new window


confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down
0
 
LVL 8

Accepted Solution

by:
ragnarok89 earned 300 total points
ID: 38764164
This should do it.
example.xlsx
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 100 total points
ID: 38764183
The following seems to work for me in H6:

=INDEX(A:A,MIN(IF((Table92[ccode]=G6)*(MAX(IF(Table92[ccode]=G6,Table92[LookupDate],""))=Table92[LookupDate]),ROW(Table92[ccode]),10^99)),1)

Note that ccode = code
0
 

Author Closing Comment

by:newparadigmz
ID: 38767292
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question