Andorra has no railways, neither is there is a practicable rail/bus connection from Barcelona.
Barcelona - Andorra by bus
ALSA - www.alsa.es has several daily runs Barcelona Nord Bus Station to Andorra, takes a little over 3 hours.
So does Andorra Direct Bus http://www.andorradirectbus.es/ note that these leave from Barcelona SANTS railway station in the city centre. Information is only in Spanish.
Andorra - Toulouse by Autocars Nadal is rumoured to exist but I cannot find any information either.
There are two buses a day from Andorra into France to connect with the local trains to Toulouse, one of which leaves at 545am and the other at 445pm with a four journey ahead of you to Toulouse! (www.andorrabus.com)
Local trains within France to Toulouse
To see how to get back to Barcelona, either look at the link across to the right,, which will take you back all the way by train with a change at the border, slow and scenic) or go to www.voyages-sncf.com for the fast trains via Narbonne and the coast.
I hope that helps.
Edited: 3:19 pm, March 19, 2012