Years ago we stayed in Barcelona and took a drive through the mountains to Andorra which was quite interesting. We decided to stay overnight there and go back to barcelona the following day. I think there are tour companies that also organize day trips.