I've been to Barcelona and Madrid once each, both times on business : \
The time in Barcelona I was put up for two nights at
Hotel Costanza and I can't in good conscience not recommend it to anyone who might be in the area. The rate and return ratio was fantastic (it seems comparable hotels are about twice the price), you're within walking distance from las Ramblas yet far enough away to avoid the noise, the staff was excellent, the overall "feel" of the hotel was very modern with lots of clean hard lines and rich reds. A coworker made a comment about the size of the rooms, but I feel if you're traveling in Spain (or any country), you're probably not going to be spending a whole lot of time in your room unless you're ill or something. If you dislike your travel companion you might feel a little cramped but otherwise I couldn't complain.
I don't know about availability, but I'd imagine you can't just drop in and find a room. If you're gonna be in the area you should give this one a look though.