Tell me how you can return a value that satisfies the following condition:
There is a number. It is necessary to find the range in which this number falls, returning the value corresponding to this range, and the range is selected from the condition. As follows:
ABC Диапазоны Условие Значение диапазона 1.12230 21 II 2.51764 21 II 3.59535 21 III 4.60691 21 III 5.80136 21 IV 6.95233 21 IV 7.121573 22 II 8.212050 22 II 9.235020 22 III 10.260778 22 III 11.331025 23 I 12.387000 23 I 13.400000 23 II 14.531143 23 II For example, Number = 92333, condition = 21. Analyzing the list of ranges with condition 21, we find that this number is satisfied by a range of 5-6, which means that IV should be displayed
UPD
ABC Диапазоны Условие Значение диапазона 1.12230 21 II 2.51764 21 II 3.51765 21 III 4.60691 21 III It turns out the array should be processed, not the first incoming number. Ie drive first through a range of 1-2, then 3-4, etc.
