Finding Max and its corresponding min

kamoorthy

New Member
Joined
Jun 26, 2014
Messages
6
Overs34156
Runs10100712356
Wickets24244

<tbody>
</tbody>
I want get the max value from "Wickets" and corresponding min value from "Runs". For ex, in this table Max value in "Wickets" is 4. I want to find the corresponding min value for 4. So i want my result as 4 and 56(instead of 100 and 123 in runs). I can use the Max function to get the value from A, but my question how i have to find the corresponding minimum value? And i want my result as 4-56

=CONCATENATE(MAX(OFFSET(SD!$C$4:$MM$4,(ROWS($1:2)-1)*4,0)),"-",MIN(IF(SD!$C$4:$MM$4=MAX(OFFSET(SD!$C$4:$MM$4,(ROWS($1:2)-1)*4,0)),SD!$C$3:$MM$3)))

I used this formula and Commit by using CTRL+SHIFT+ENTER and not just Enter by itself.


 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
kamoorthy,

Maybe try.....

Excel 2007
BCDEFG
2Overs34156
3Runs10100712356
4Wickets24244
5
6
74-56
SD
Cell Formulas
RangeFormula
B7{=MAX(SD!C4:MM4)&"-"&MIN(IF(SD!C4:MM4=MAX(SD!C4:MM4),1,9^4)*(IF(SD!C4:MM4+C3:MM3=0,9^4,SD!C3:MM3)))}
Press CTRL+SHIFT+ENTER to enter array formulas.



Hope that helps.
 
Last edited:
Upvote 0
kamoorthy,

Maybe try.....
Excel 2007
BCDEFG
2Overs34156
3Runs10100712356
4Wickets24244
5
6
74-56

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
SD

Array Formulas
CellFormula
B7{=MAX(SD!C4:MM4)&"-"&MIN(IF(SD!C4:MM4=MAX(SD!C4:MM4),1,9^4)*(IF(SD!C4:MM4+C3:MM3=0,9^4,SD!C3:MM3)))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Hope that helps.

Hello,

Thanks for your time. It works good for the first cell

1. {=MAX(SD!C4:MM4)&"-"&MIN(IF(SD!C4:MM4=MAX(SD!C4:MM4),1,9^4)*(IF(SD!C4:MM4+SD!C3:MM3=0,9^4,SD!C3:MM3)))}
2. {=MAX(SD!C5:MM5)&"-"&MIN(IF(SD!C5:MM5=MAX(SD!C5:MM5),1,9^4)*(IF(SD!C5:MM5+SD!C4:MM4=0,9^4,SD!C4:MM4)))}
3. {=MAX(SD!C6:MM6)&"-"&MIN(IF(SD!C6:MM6=MAX(SD!C6:MM6),1,9^4)*(IF(SD!C6:MM6+SD!C5:MM5=0,9^4,SD!C5:MM5)))}

FOr each cell, the formula looks like above. But i need to increment 4 cells automatically. After C4 i want to check with C8, then C12 and so on.

Please let me know, if i am missing anything
 
Upvote 0
It depends on the data set and where you are putting the formula.
Something like below perhaps will drag down to give you what you want.

Excel 2007
ABCDEFG
2Overs34156
3Runs10100712356
4Wickets24244
54-56
6Overs12345
7Runs34227123100
8Wickets24255
95-100
10Overs34156
11Runs10100712356
12Wickets24264
136-123
SD
Cell Formulas
RangeFormula
A5{=IF(B4="Wickets",MAX(SD!C4:MM4)&"-"&MIN(IF(SD!C4:MM4=MAX(SD!C4:MM4),1,9^4)*(IF(SD!C4:MM4+C3:MM3=0,9^4,SD!C3:MM3))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,146
Messages
6,129,142
Members
449,488
Latest member
qh017

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