Would be much easier if attached a subset of the input file or a .mat file containing the table...we have to make up stuff to try to fit the verbal description. From the sounds of it, I'd guess the "column 7" variable is the flight number.
Here's the power of MATLAB -- you "don't need no steenkni' loops!" to do this; just logical addressing
will give you the complete selection for the given flight; it's immaterial for the selection process about whether is Arr or Dep on the direction; if the original table is in chronological order, then they should already be paired in terms of Dep/Arr times.
The above, of course, makes a whole lot of presumptions about details that aren't provided that would be required to write real code.