I am trying to replicate the Index Match function in excel. I have userInputQty and userInputLoc1. I need to use these to look at a chart and set a variable. For example:
if userInputLoc1 <= 1 && userInputQty <= 23 {
let printCost6 = 2.50
} else {
let printCost6 = 5
}
I know that I can not access printCost6 outside of the if statement. That is my problem. I do not know how else to achieve the same thing. I have 7 different scenarios that I need the userInputs to be matched against. IE multiple qtys to multiple locations. Thanks in advance.