We have this table
+--------------+-----------+----------+-------+
| Destination | Beginning | End | Value |
+--------------+-----------+----------+-------+
| Riohacha | 0 kg | 500 kg | $100 |
| Riohacha | 501 kg | 1000 kg | $200 |
| Manaure | 0 kg | 1000 kg | $300 |
| Manaura | 1001 kg | 2000 kg | $400 |
| Maicao | 0 kg | 1000 kg | $500 |
| Maicao | 1001 kg | 2000 kg | $600 |
+--------------+-----------+----------+-------+
I need a formula that
- when "Cell A1: Riohacha" and "Cell B1: 478 kg", it returns the "Value" $100, because the destination matches Riohacha on the table and the weight in kg is between 0 kg and 500 kg.
- when "Cell A1: Manaure" and "Cell B1: 1030 kg", it returns the "Value" $400 because it finds Manaure on the table and because the weight 1030 kg is between 1001 kg and 2000 kg.
In short I need a formula in "Value" where it finds the number that has the same destination and is between the numbers.