# MIN and MAX

#### perrin

##### New Member
I have a spreadsheet that tells me the highest and lowest expenses for
each month using the MIN and MAX formulas but how do I get it to tell
the month that the highest and lowest expenses occured. Right now it
just give the dollar amounts for each. Waht would the forlumla be to
do
that right now in cell B25 I have =MAX(B21:M21) and in B26 I have
=MIN(B21:M21) my months are listed in cells B2 through M2. Any Ideas
on
how to display the month with the amount. Thanks

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Did you try looking at the lookup techniques?

ie vlookup or hlookup?

right now in cell B25 I have =MAX(B21:M21) and in B26 I have
=MIN(B21:M21) my months are listed in cells B2 through M2. Any Ideas
on
how to display the month with the amount. Thanks

Try:
=INDEX(B2:M2,1,MATCH(MAX(B21:M21),B21:M21,0))

for the max,

=INDEX(B2:M2,1,MATCH(MIN(B21:M21),B21:M21,0))

for the min.

You could replace the min / max calculations with cell references if you've already got the values calculated.

Note - no attempt has been made to deal with duplicate instances of the max / min values - what should happen in such cases?

This message was edited by PaddyD on 2002-09-22 17:59

Replies
3
Views
215
Replies
5
Views
155
Replies
2
Views
317
Replies
1
Views
150
Replies
8
Views
343

1,206,921
Messages
6,075,578
Members
446,147
Latest member
homedecortips

### 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.

### Which adblocker are you using?

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

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