I am traveling to Barcelona this October and wish to take a day-trip to Andorra. Is this possible?
It's definitively possible. If you check Google Maps, you can see that an one-way journey takes approximately 3 hours.
So If you leave early morning, you can be there on late forenoon. Then you can spend some hours there and go back late evening.
However, you have to decide by yourself if that's reasonable for you. You will have to drive a long time in one day. Maybe it is worth to think about staying at least one night in Andorra. It also depends on your plans in Andorra. Do you just want to visit it once to increase your country counter, or do you want to do some hiking there?
A day trip frome Barcelona to Andora is definitely a great option and it is quite popular with those who are looking to shop and enjoy Andora's nightlife or its fantastic nature. Getting to Andora is possible by bus, by a rented car or by different companies that organize a day trip. My recommendation is to take advantage of the day trip or alternatively to lodge in the city and enjoy the beautiful area.