Return the Greatest Value in a Range

maic15

Active Member
Joined
Nov 17, 2004
Messages
313
Hello,

I have a issue that I hope some can help me. I need to tax the max value of the "# of Unique providers for a durations" field and return the value from "Provider-Level Duration" in a seperate column.

I have three columns with three records:
ID:
Provider-Level Duration:
# of Unique providers for a durations:

The values in the field are the following:
ID:
CAR INST FOR DEV DISABILITIESNEW MEDICAL CONSULTATION15
CAR INST FOR DEV DISABILITIESNEW MEDICAL CONSULTATION180
CAR INST FOR DEV DISABILITIESNEW MEDICAL CONSULTATION120
Provider-Level Duration:
9
1
10
# of Unique providers for a durations:
15
180
120

I'm looking for the following result:
ID: CAR INST FOR DEV DISABILITIESNEW MEDICAL CONSULTATION120
Provider-Level Duration: 10 (This is the max value of the three records
# of Unique providers for a durations:120
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
If I understand correctly, you want to look for the maximum value in Column B (Provider-Level Duration) and then based on that, pull the corresponding information from Column A (ID) and Column C: (# of Unique providers for a durations) from the same row as your match in Column B. Is that correct?

If so, can you also let me know if the values in Column B unique? For example, is there a case where multiple records might have the same maximum value for Column B (Provider-Level Duration) ?
 
Upvote 0
Correct. Column A (ID) will have unquie values. I mistyped "CAR INST FOR DEV DISABILITIESNEW MEDICAL CONSULTATION"
 
Upvote 0
To determine the maximum value in Column B, you can use this formula in cell D2: =max(b:b)

To then pull in the corresponding value from Column A: =INDEX(A:A,MATCH(D2,B:B,FALSE),1)
To then pull in the corresponding value from Column C: =INDEX(C:C,MATCH(D2,B:B,FALSE),1)
 
Upvote 0
I think I stated it wrong. I need a 1 enter into a cell in column D that matches my logic.

For example, in an array A2:A4, take the max of C2:C4, and return a value of B2:B4, that matches the max of C2:C4
 
Upvote 0
If I understand correctly, you are looking for the greatest value in Column C and then pulling the corresponding data in Column B from the same row that the max C value was found. If you want it all in a single cell you could do =INDEX(B:B,MATCH(MAX(C:C),C:C,FALSE),1)
 
Upvote 0

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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