Forum Discussion

areed96's avatar
areed96
Copper Contributor
Apr 15, 2019
Solved

IF Statement Help

I'm aiming to produce a report on airline arrivals into different gates at an airport, there are thousands of entries so I need to automate this.  I have produced a small example below:    AIRLI...
  • SergeiBaklan's avatar
    SergeiBaklan
    Apr 16, 2019

    areed96 , for such sample

    the formula is

    =IFNA(INDEX($K$3:$K$9, MATCH(B3,$I$3:$I$9,0)),"not defined")

    To make it more flexible you may convert your ranges into table (Sheet2)

    =IFNA(INDEX(Gates[GATE], MATCH([@AIRLINE],Gates[AIRLINE],0)),"not defined")

    or use dynamic ranges (Sheet3), here all cells are to be filled

    =IFNA(INDEX($K$3:INDEX($K:$K,COUNTA($K:$K)+ROW($K$2)), MATCH($B3,$I$3:INDEX($I:$I,COUNTA($I:$I)+ROW($I$2)),0)),"not defined")