MAX formula-highest value per card #

MikeInKansas

New Member
Joined
Oct 17, 2005
Messages
5
i get a XL download from our vehicle fuel cards, and each "row" is a fuel fillup, per Card number, and also a Mileage at that time-the MAX function gives me a number for the entire download, but i need a Maximum for ONLY those records that match a specific card number :
Card # Mileage

0172 - 1 161,211
0172 - 1 188,490
0172 - 1 107,715
0172 - 1 136,297
0172 - 1 188,333
0172 - 1 142,239
0172 - 1 13,730
0225 - 1 10,069
0225 - 1 171,296
0225 - 1 70,290
0225 - 1 61,354
0225 - 1 66,311
0225 - 1 13,530
0225 - 1 111,996
0225 - 1 211,295
0225 - 1 173,141
0225 - 1 161,136
0225 - 1 178,636

Need Highest Mileage By Card

0172 - 1 _____________
0225 - 1 _____________

This seems like a "2-dimensional" lookup..
Thanks for any help !
Mike
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
actually, i get over 600 records each month-we have 75 vehicles
i just selected a sample for the post
but yes, i could easily sort the records by card number, then mileage
but i dont want to then find and write down the ending mileage!
Thanks
 
Upvote 0
array formula to get the max for value "0172 - 1"
Replace a$1:a$18 (the range of the Card number) and b$1:b$18 (the mileage) with the appropriate ranges.

Code:
=MAX(IF(A$1:A$18="0172 - 1",B$1:B$18,""))
use control-shift-enter to enter it. Excel will pull curly braces around it.

There's some pretty good info out on the web if you want try searching for "Excel Maxif" or "Excel Minif" -- there's some traps for the unwary user using these types of formulas.
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,519
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top