Barcelona to Andorra is not a good day trip... It takes 3 1/2 hours by bus. There are no train stations in Andorra proper. By car it takes about 3 hours barring traffic and depending on how you drive in the mountains...