U2 8017 then IB 409 at Madrid
London Gatwick → Madrid → Barcelona
Timetable, Madrid time
12:45U2 8017 from London Gatwick at the gate
10:25IB 409 to Barcelona leaves the gatealso IB 409S, LA 1624, CX 1827, LL 3009, VY 5116, AV 6078, BA 7129, QR 7246, AA 8727
21 h 40 apart on the timetable, overnight
IB 409 leaves 21 h 40 after U2 8017 arrives on the timetable: more than half a day, so not a connection we count.