In excel I have a list of names each with a value associated with them.
I also have a min and max value.
I want to use an array formula to find all the names in the list which are between those min and max values.
To start with I created an array formula that worked to just find all the names where the value was greater than the min value:
This used the following formula in cells D5 (copied down to D10):
{=INDEX($A$1:$B$6,SMALL(IF($B$1:$B$6>=$E$1,ROW($B$1:$B$6)),ROW(1:1)),1)}
Then I tried to modifiy this formula to find the names with values between the min and max values, in cell F5 as follows:
{=INDEX($A$1:$B$6,SMALL(IF(AND($B$1:$B$6>=$E$1,$B$1:$B$6<=$E$2),ROW($B$1:$B$6)),ROW(1:1)),1)}
But it doesn't work, see image below:
How can I solve this? Do I need to use VBA?