I assume you have considered flying into one and out of the other so that there is only one one-way trip between the cities. Multi-city fares to Europe from the US are usually the same as RT in/out of one city if the carrier flies into both airports. AA goes to both MAD and BCN, don't know about others.