I will be travelling in Spain from October 8th to 22nd. I'll be in Madrid the first 5 days of the trip and Barcelona the last 5. What can I expect weather-wise in these two cities at this time of year?
Should be cooler and dry but it could be hot and wet. Just check one of the weather sites for average information. That is at best a weak indicator. Just be prepared. Reminds me of the joke. Someone has his head in the oven and feet in the freeze but his average body temperature is OK. Madrid tends to be cooler because it sits on a high plain and is the highest European capitol.
Most likely the weather will be decent. As noted, probably cooler and maybe a little rain in Madrid but Barcelona should be fairly nice. Northwest Spain/Portugal could be quite rainy. Southern Spain/Andalucia should be warm and sunny for the most part.
One of my coworkers has a house near Barcelona. She said October is nice but not really beach weather. October in Southern Spain is probably still good for the beach.