Retrieve the MIN of a list, based between values in another column

Silverhorne

New Member
Joined
Feb 21, 2015
Messages
42
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Good day!

I am trying to find the MIN of a list of numbers based on the "Start" and "End" placed in another column.
In the attached example, I would like the minimum in column C between where the Start and End is in column E.
The start and end will change cells, the numbers in column C are not in any order and may have duplicates.
Cell B31 gives the value I am looking for.
I thought I could used a cell address function for this but it doesn't work....

Thanks in advance for any help.....

MR Excel Min.xlsx
ABCDE
11928-04-23 7:16:5487910.90
22028-04-23 7:17:54350710.91
32128-04-23 7:18:54103410.92
42228-04-23 7:19:54119810.94
52328-04-23 7:20:54136210.95Start
62428-04-23 7:21:54153910.96
72528-04-23 7:22:54320710.97
82628-04-23 7:23:54186910.98
92728-04-23 7:24:54426710.99
102828-04-23 7:25:54222611.00
112928-04-23 7:26:54411911.00
123028-04-23 7:27:54254611.00
133128-04-23 7:28:54269710.97
143228-04-23 7:29:54455410.94
153328-04-23 7:30:5487910.91
163428-04-23 7:31:54320710.85
173528-04-23 7:32:54336110.75
183628-04-23 7:33:54350710.68
193728-04-23 7:34:54365710.59
203828-04-23 7:35:54381010.52END
213928-04-23 7:36:54396510.44
224028-04-23 7:37:5487910.38
234128-04-23 7:38:54426710.31
244228-04-23 7:39:54441410.25
254328-04-23 7:40:54455410.19
264428-04-23 7:41:54469110.12
27
28$C$5
29$C$20
30#VALUE!
31879.00
Sheet1
Cell Formulas
RangeFormula
B28B28=ADDRESS(MATCH("Start",Sheet1!$E$1:$E$26,0),3)
B29B29=ADDRESS(MATCH("End",Sheet1!$E$1:$E$26,0),3)
B30B30=-MIN(ADDRESS(MATCH("Start",Sheet1!$E$1:$E$26,0),3),ADDRESS(MATCH("End",Sheet1!$E$1:$E$26,0),3))
B31B31=MIN(C5:C20)
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Not too much head scratching on my part, so I'm sure there's a better way but this seems to do it:

Code:
=MIN(INDEX(C1:C100,SEQUENCE(MATCH("End",E1:E100,0)-MATCH("Start",E1:E100,0)+1,,MATCH("Start",E1:E100,0))))
 
Last edited:
Upvote 1
Solution
I tried it in the example sheet I posted and it works, my actual workbook has 2 sheets and it pulls the values from another sheet.
I thought I could modify it to make it work but it's not giving me the correct number.
Here is what my formula looks like...

=MIN(INDEX(Sheet1!D4:D1500,SEQUENCE(MATCH("Off Strength",Sheet1!F4:F1500,0)-MATCH("On Strength",Sheet1!F4:F1500,0)-MATCH("On Strength",Sheet1!F4:F1500,0)+1,,5)))

I took out the MIN part and it's giving me a list of the first 8 lines of Sheet1!F4:F1500. I am not sure what the last "5" is doing, is that my problem?
 
Upvote 0
Try the edit I made in post #3. You may have looked at it before I change the post.
 
Upvote 0
Another way would be
Excel Formula:
=MIN(XLOOKUP("Start",E1:E26,C1:C26):XLOOKUP("End",E1:E26,C1:C26))
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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