AR 7327 then FR 394 at Madrid
Lisbon → Madrid → Ibiza
Timetable, Madrid time
13:50AR 7327 from Lisbon at the gate
06:40FR 394 to Ibiza leaves the gate
16 h 50 apart on the timetable, overnight
FR 394 leaves 16 h 50 after AR 7327 arrives on the timetable: more than half a day, so not a connection we count.