Short Answer:
No, it's not haraam to take medicine that contains alcohol, but haram to use alcohol itself as a medicine.
Completion:
That's because when melted with water (or medicine) in small amounts (for example, 5% alcohol), alcohol will dissolve and the result will not cause person to be drunk, which is why alcohol is prohibited (causing one to be drunk), and once the prohibition reason is gone, then prohibition itself is gone, too.
Here is a quotation from one major fiqh book (of the Shafei school):
محل الخلاف في التداوي بها – يعني بالخمر - بصرفها ، أما الترياق المعجون
بها ونحوه مما تستهلك فيه ، فيجوز التداوي به عند فقد ما يقوم مقامه ،
مما يحصل به التداوي من الطاهرات ، كالتداوي بنجس ، كلحم حية ، وبول ,
ولو كان التداوي بذلك لتعجيل شفاء ، بشرط إخبار طبيب مسلم عدل بذلك ، أو
معرفته للتداوي به
It's disputed whether it's allowed or prohibited to use pure
alcohol in treatment. But for antidote (and the like) that it's melted
with and dissolved, then it's allowed to use it in treatment if
there's no (alcohol-free) immaculate replacements that are usually
used in treatment. It's like when treating with impure things, like snake
meat, or urine. It's allowed to use it in treatment even it that was
only to hurry up the healing. But under the condition of telling an
upright muslim doctor about that.
Mughni Al Muhtaj By Al-Khateeb Al-Sharbini (may Allah be merciful to
him), 518/5.
Also there are fatwas about this issue:
International Islamic Fiqh Academy, conference #3, decision #11, question #12:
Q: There are a lot of medicine that contains different amounts of
alcohol that varies between 0.01% and 25%, and most of them are
medicine for cold, sore throat, cough, and other popular diseases. The
medicine that contains alcohol is about 95% of the medicine in this
field, so obtaining alcohol-free medicine becomes very difficult or
impossible, can we get these (alcohol-containing) medicine?
A: A muslim patient can get medicine that contain percentage of
alcohol if there is no alcohol-free replacement available, at the
prescription of an honest muslim doctor.
Islamic Fiqh Council of the Muslim World League MWL, conference #16, decision #6:
Using pure alcohol in treatment is not allowed in any case, because The Prophet (PBUH) said: (Allah didn't put your treatment in what he
prohibited you) Sahih Bukhari, and The Prophet (PBUH) said: (Allah
created medicine for every disease so you have to get treatment, and
don't use haraam (things) in treatment) Ibn Dauood in his sunan, and
Ibn Assuni, and Abu Na'im. And he (The Prophet) told Tariq bin Swaid
when he asked him about using alcohol in treatment: (It's not a
treatment, but a disease) Ibn Majah in his sunan, and Aub Na'im.
It's allowed to use in treatment medicine that contains percentage of alcohol that dissolve and are important for the medical industry
and have no replacement. Under the prescription of an upright doctor.
It's also allowed to use alcohol as an outside antiseptic for wounds,
and germs killer, and in (outer) kreams.
The Islamic Fiqh Council recommends medical industry companies and pharmacists in Islamic countries, and medicine importers, to make the
best they can to exclude alcohol from medicine and alcohol containing
medicine, and use alternative medicine.
The Council also recommends doctors to avoid prescribing alcohol-containing medicine.
This is the main source of the answer (it depends on the same evidences).
Hope that's clarifying enough.
P.S: sorry for typos and bad translation, any edit is most welcome :)