Index / match? To return an adjacent cell to a min formula

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
795
Office Version
  1. 365
Platform
  1. MacOS
[FONT=&quot]Hi. I have this formula in my Excel spreadsheet:[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]=MIN(C4,K4,S4,AA4)[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]It gives me the minimum time value from each race, as the running event is comprised of 4 sub events of which your best time counts. I would like to know, how do I get my spreadsheet to display the adjacent cells to the left and right of the source cell (Time) that contains the min value (i.e. their quickest race of the 4), in the cell adjacent (left and right) to my formula cell. Essentially, populating the blank cells according to the quickest race the person has run.

Can I attach my spreadsheet file to the post?[/FONT]
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You'd have to do a index(...match() ) and subtract/add 1 from/to the column to retrieve data either side.
e.g.
=INDEX(A4:ZZ4,1,MATCH(MIN(C4:K4,S4,AA4),C4:AA4,0)-1)
=INDEX(A4:ZZ4,1,MATCH(MIN(C4:K4,S4,AA4),C4:AA4,0)+1)

Beware of repeated data, e.g. C4=K4, S4=AA4 though this is probably unlikely it is possible.


You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.
 
Upvote 0
Thanks so much. Could you perhaps check it works in the file? This is such a great help, thanks again.
 
Upvote 0
Hello,

For the cell to the left ..you can test : =INDIRECT(ADDRESS(4,MATCH(MIN(C4,K4,S4,AA4),$4:$4,0)-1,4))

Hope this will help
 
Upvote 0
Apologies, that =seems to work for the left side (AH4), I accidentally tested it in AJ4. What would I need for AJ4, AK4, AL4, AM4, AN4 & AO4? Thanks
 
Upvote 0
How about, in AH4
=INDEX(A4:ZZ4,MATCH(AI4,A4:AA4,0)-1)
and in AJ4
=INDEX(A4:ZZ4,MATCH(AI4,A4:AA4,0)+1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,185
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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