Index match formula for maximum and first values

Tom N

New Member
Joined
Aug 30, 2016
Messages
15
Hello
I am using index/match and related formulas to find the largest, first, and last values among the groups of values.
Column B gives an ID for the rows grouped together for the comparisons.
The columns C, D, and E list the values to be compared. My formula using offset/index/match works for finding the last value in the group but I haven’t been able how to capture the first values with the parameters of index/match and the highest values for columns F and G with the Max function.. I have highlighted the appropriate values in C, D, and E that the formulas should return.The values for column C go to column F, D to G, and E to H.

ColumnF =OFFSET(INDEX($B2:$B23,MATCH($B2,$B2:$B$23,1),0),0,1)
ColumnG = =MAX(OFFSET(INDEX($B2:$B23,MATCH($B2,$B2:$B$23,1),0),0,2))
ColumnH= =OFFSET(INDEX($B2:$B23,MATCH($B2,$B2:$B$23,1),0),0,3)
ABCDEFGH
12012.521.03321.03441.02821.03111.03401.0337
22012.521.02861.03141.03031.03111.03401.0337
32012.521.03031.03291.03111.03111.03401.0337
42012.521.03111.0341.03371.03111.03401.0337
52013.011.03261.03561.03151.03371.03511.0343
62013.011.03321.03551.03481.03371.03511.0343
72013.011.03461.03691.03361.03371.03511.0343
82013.011.03371.03511.03431.03371.03511.0343
92013.021.03621.03651.03551.04121.04141.0376
102013.021.03541.03681.0361.04121.04141.0376
112013.021.0361.03861.03761.04121.04141.0376
122013.021.03741.04371.04131.04121.04141.0376
132013.021.04121.04141.03761.04121.04141.0376
142013.031.03651.04161.03871.03881.04311.0419
152013.031.03871.03991.03911.03881.04311.0419
162013.031.03931.04241.04151.03881.04311.0419
172013.031.04151.04171.03881.03881.04311.0419
182013.031.03881.04311.04191.03881.04311.0419
192013.041.04161.04511.04331.05281.05381.0474
202013.041.04331.051.04731.05281.05381.0474
212013.041.04731.05431.05281.05281.05381.0474
222013.041.05281.05381.04741.05281.05381.0474

<tbody>
</tbody>



Thank you in advance.

Tom
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
OFFSET is a volatile function so is best avoided where possible.

It is good to show what you have tried but also good to show the expected results, rather than the wrong results which I think is what you have shown for the last two columns.

Do these formulas, copied down do what you want?
If not explain which ones are wrong, what the correct values should be and how you (manually) get those values.

H2 is an array formula so should be entered without the {} but confirmed with Ctrl+Shift+Enter, not just Enter. If confirmed correctly, Excel will insert the {}. The formula can then be copied down.

Excel Workbook
ABCDEFGH
1#IDVal 1Val 2Val 3FirstLastLargest
212012.521.03321.03441.02821.03321.03371.0344
322012.521.02861.03141.03031.03321.03371.0344
432012.521.03031.03291.03111.03321.03371.0344
542012.521.03111.0341.03371.03321.03371.0344
652013.011.03261.03561.03151.03261.03431.0369
762013.011.03321.03551.03481.03261.03431.0369
872013.011.03461.03691.03361.03261.03431.0369
982013.011.03371.03511.03431.03261.03431.0369
1092013.021.03621.03651.03551.03621.03761.0437
11102013.021.03541.03681.0361.03621.03761.0437
12112013.021.0361.03861.03761.03621.03761.0437
13122013.021.03741.04371.04131.03621.03761.0437
14132013.021.04121.04141.03761.03621.03761.0437
15142013.031.03651.04161.03871.03651.04191.0431
16152013.031.03871.03991.03911.03651.04191.0431
17162013.031.03931.04241.04151.03651.04191.0431
18172013.031.04151.04171.03881.03651.04191.0431
19182013.031.03881.04311.04191.03651.04191.0431
20192013.041.04161.04511.04331.04161.04741.0543
21202013.041.04331.051.04731.04161.04741.0543
22212013.041.04731.05431.05281.04161.04741.0543
23222013.041.05281.05381.04741.04161.04741.0543
First Last Largest
 
Last edited:
Upvote 0
That's exactly what I needed the formula to do. It is amazing how simple your formula is!
PS I will keep working with the posting tools provided, but I have been having trouble with them.
Thank you for your help.
 
Upvote 0
That's exactly what I needed the formula to do. It is amazing how simple your formula is!

Thank you for your help.
You are very welcome. Glad it helped. :)


PS I will keep working with the posting tools provided, but I have been having trouble with them.
Have a look in the About This Board forum to see if you can find any other threads that deal with the particular problem(s) you are having. If you cannot find anything, then I'd suggest that you post your own thread there and detail your Excel version, operating system, which of the tools you are trying and exactly what problem(s) you are running into. There are very few people who cannot eventually get at least one of the tools up and running. Good luck!
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,665
Members
449,091
Latest member
peppernaut

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