UA 51 then VY 1011 at Madrid
Newark → Madrid → Barcelona
Timetable, Madrid time
09:30UA 51 from Newark at the gatealso AC 3728, LH 7970, SN 9027
09:20VY 1011 to Barcelona leaves the gate
23 h 50 apart on the timetable, overnight
VY 1011 leaves 23 h 50 after UA 51 arrives on the timetable: more than half a day, so not a connection we count.