Something simple like this using lookup()?
You can edit the structure in the formula to match what you want as I am not sure as your multiplier expressions don't match what you have in your function.