We will be doing the same next year - flying into Madrid and have to leave luggage there for a couple of weeks.
Luggage can be left at the airport (you can go to Madrid airport website - don't know how to post a link
)
This is taken from their website (
http://airwise.com/airports/europe/MAD/index.html)
Left Luggage facilities are available in two areas, but there are no lockers inside the terminals.
The larger of the two facilities (370 lockers) is at ground level opposite Terminal 1, Arrivals Lounge 2. Large and small lockers are provided. Passport or identification cards are required and bags are security checked.
The second facility (110 lockers) is located on the connecting walkway between Terminal 2 and Car Park 2.
--------------------------------------------------------------------------------
Size Period Cost per day
--------------------------------------------------------------------------------
Small Lockers 1 day € 2.65
2-15 days € 3.30
After 15 days € 0.66
Large Lockers 1 day € 2.65
2-15 days € 4.65
After 15 days € 1.33
--------------------------------------------------------------------------------
Baggage storage works on a system of keys and tokens which can be confusing. Be patient when opening the locker - it does work eventually.
Hope this helps.