excel formula to choose the largest value for cell 1

tinkode

New Member
Joined
Oct 21, 2018
Messages
35
Hello kings of the formula

i need a formula to choose the largest value of the cell 1

bpZ69hi.png
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try


Excel 2013/2016
AB
2010
3020
40315
5046
6051
7062
8073
9083
10093
11103
12113
13123
14133
15143
16153
17163
18173
19183
20193
21
2203
vor
Cell Formulas
RangeFormula
B22=INDEX(A2:B20,MATCH(LARGE(B2:B20,1),B2:B20,0),1)
 
Upvote 0
Place this formula in the cell where you want the value returned: =INDEX(A2:A20,MATCH(MAX(B2:B20),B2:B20,0))
The formula assumes your data is in columns A and B.
 
Last edited:
Upvote 0
You could just add this function to create your own formula

Code:
Function OffsetMax(Rng As Range)


PrevCol = 0
XVal = 0


For Each X In Rng
    
    If X > XVal Then
    
        XVal = X
        PrevCol = X.Offset(0, -1).Value
        
    End If
    
Next


OffsetMax = PrevCol


End Function

And then use =OffsetMax(B3:B20) <-- example, the B3:B20 will be replaced by your right hand column range. This will display the Offset 0, -1 of the largest value.

In no way do I consider myself an excel expert. The above function is pretty nifty to use I guess. It took me a while to get the Index + Match formulas into my brain. This is something I have just thought of from the top of my head. It's always fun to experiment though :)
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

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