Hlookup for max value

Pow3R

New Member
Joined
Aug 17, 2017
Messages
6
Hello all, I have a range of data as table below and looking for the max cost for each item.
Wondering how can I use HLOOKUP to get the max cost.
Thanks for advance!

Item AItem BItem CItem AItem DItem B
Cost 124510920
Cost 211822485

<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>
</tbody>


Result

Item AItem B
Cost 11020
Cost 2118

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Item A >> 40, not 38; but Item C >> 15, not 29. How do we get into this? Are we looking for the last value or the max value?
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Item AItem BItem CItem AItem CItem D
Cost 1
Cost 2
Cost 3
Cost 4401029381532
Looking for the maximum value of "cost 4" for each item
Result
Item AItem BItem CItem D
Cost 4

<tbody>
</tbody>

If the last value is meant...

In B10 control+shift+enter, not just enter, and copy across:

=LOOKUP(9.99999999999999E+307,IF($B$1:$G$1=B$9,INDEX($B$2:$G$5,MATCH($A10,$A$2:$A$5,0),0)))

If the max value is meant...

In B10 control+shift+enter, not just enter, and copy across:

=MAX(IF($B$1:$G$1=B$9,INDEX($B$2:$G$5,MATCH($A10,$A$2:$A$5,0),0)))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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