"Improvised" is the word that popped into my mind. I agree with Mikkel that "makeshift" is not informal; and I just checked a dictionary and it does not flag it as informal.
"Makeshift" is a compound of two Old English words, while "improvised" is derived from Latin, so as usual the Latin-derived word is a bit more formal.
There's a slight difference in meaning. "Makeshift" suggests that something doesn't work very well and probably won't work for very long. "Improvised" means only that a creative solution was found, using materials at hand, that weren't intended for the purpose. An "improvised" solution might be very good.