Find min or max value in between two numbers

swemek

New Member
Joined
Dec 13, 2023
Messages
9
Office Version
  1. 2021
Platform
  1. MacOS
Hi all!

I have a column A1:A21 with both negative and positive values.
In it I want to find the minimum or maximum value based on values in B1min and B2max. And the results/formula in B3

So if I enter -7,86 in B1 and 2,82 in B2, excel should find -6,92 if min, or 1,84 if max.
I assume the formula is the same for min and max value.


Any help is appreciated!😊

//M
Example A1:A21
1717507493829.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
How about
Excel Formula:
=MIN(FILTER(A1:A21,(A1:A21>B1)*(A1:A21<B2)))
 
Upvote 0
Formula for MIN value in that range:
Excel Formula:
=MINIFS(A1:A21,A1:A21,">"&B1)

Formula for MAX value in that range:
Excel Formula:
=MAXIFS(A1:A21,A1:A21,"<"&B2)
 
Upvote 0
Works great! (both suggestions):)

Thanks so much for your help!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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