Forum Discussion

CFrench11's avatar
CFrench11
Copper Contributor
Apr 13, 2022
Solved

Formulas

I have an excel spreadsheet that has information in a table. The table shows prices for a flight based on destination and class (first or economy). I am trying to make it so that when the input is a ...
  • PeterBartholomew1's avatar
    Apr 13, 2022

    CFrench11 

    I don't think it is a case of a 'correct' answer.  There are many variations that will work and it also depends upon the version of Excel that you use.  Using modern functions but stopping short of Lambda functions one might have

    = XLOOKUP(
        Destination,PriceTbl[Destination],
          SWITCH(Class,
            "First",PriceTbl[First],
            "Economy",PriceTbl[Economy])
      )

Resources