Solved

Lookup Max value with criteria

Posted on 2011-03-18
2
257 Views
Last Modified: 2012-05-11
i'm trying to pull back the maximum mileage on a vehicle from a fuel system dump.

The data is on the left of the screen shot, the summary page is on the right.

i need to do a lookup using the unit number (truck number) from the summary to the data to return the max mileage (current mileage) on each vehicle.

=MAX(VLOOKUP(B4,DataDump!C:F,4,FALSE))  only returns me the first value on the mileage for that truck number not the greatest.

any help would be greatly appreciated.


screenshot.bmp
0
Comment
Question by:Matt Lennertz
2 Comments
 
LVL 8

Assisted Solution

by:ragnarok89
ragnarok89 earned 250 total points
ID: 35165312
I believe you need an array formula,

={MAX((C2:C100=$B$3)*(F2:F100))}

Type the formula without {}

press Ctrl-Alt-Enter, this will save the fmla as an array fmla, and add the {}
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 35165516
Not for points

ragnarok89's solution will work fine for MAX but if you want MIN too then the same approach won't work.......so I prefer this syntax

=MAX(IF(Datadump!C$2:C$100=B4,Datadump!F$2:F$100))

confirmed with CTRL+SHIFT+ENTER

Now if you want MIN you can use exactly the same syntax.....but with MIN in place of MAX

regards, barry
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
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…

803 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