A better version:
\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=1in]{geometry}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\begin{document}
\begin{table}[htbp]
\caption{Minimum Requirements for Automatic Readmission into the Commerce Faculty}
\centering
\begin{tabular}{@{}p{0.12\textwidth}*{4}{L{\dimexpr0.22\textwidth-2\tabcolsep\relax}}@{}}
\toprule
& \multicolumn{2}{c}{BCom} &
\multicolumn{2}{c}{B.Bus.Sci} \\
\cmidrule(r{4pt}){2-3} \cmidrule(l){4-5}
& Number of courses required to pass & Cumulative Total of Courses & Number of courses & Cumulative Total of Courses\\
\midrule
First year & 4 & 8 & 4 & 18 \\
\bottomrule
\end{tabular}
\label{table:mr}
\end{table}
\end{document}

Why your code didn't compile?
You missed a &
at the begining of
\multicolumn{2}{c}{{BCom} & \multicolumn{2}{c}{B.Bus.Sci} \\
making the first entry to go in to the first column.
You have a &&
in the line
Number of courses required to pass & Cumulative Total of Courses &&
Number of courses & Cumulative Total of Courses
It should be &
and you should put an &
at the start of line. And at the end of this line you missed \\
just before \cmidrule
.
Now the modifications
After correcting all the above, I have introduced a new column type with the help of array
package.:
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\raggedright
is added to avoid ugly justification effects since the columns can be narrow and words can vary in length. This takes care of bad boxes also.
I have used this L
column with a width
\dimexpr0.22\textwidth-2\tabcolsep\relax
through
*{4}{L{\dimexpr0.22\textwidth-2\tabcolsep\relax}}
instead of repeating.
As a side note, the \cmidrule
can be shortened from l
eft or r
ight by
\cmidrule(r{4pt}){2-3}
Here {4pt}
is the amount by which we shorten. It can be left off like \cmidrule(r){4-5}
.
Since the whole outer cell, which contains \specialcell
should be bold, \bfseries
can be specified in the outer cell, right before \specialcell
:
... & \bfseries\specialcell{...} & ...
This can also be put into a macro \specialcellbold
, see the following example:
\documentclass{report}
\usepackage{booktabs}
\usepackage{array}
\newcommand*\rotbf[1]{\rotatebox{90}{\textbf{#1}}}
\newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
\newcommand{\specialcellbold}[2][c]{%
\bfseries
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}%
}
\begin{document}
\begin{table}[hbr]
\centering
\label{tbl:heatwheel_res}
\begin{tabular}{llll}
\toprule
\textbf{Parameter} &
\specialcellbold{Exhaust\\air} &
\specialcellbold{Exhaust and\\ outdoor air} &
\specialcellbold{Heat wheel\\(80~\%)} \\
\midrule
Heat recovery [\%] & 89,6 \% & 89,6 \% & 77,4 \% \\
Real heat recovery [\%] & 50,5 \% & 52,1 \% & - \\
Net energy need for VH and SH & 27,7 & 27,0 & 15,8 \\
\specialcell{Delivered energy for\\DHW, VH and SH} & 31,1 & 27,6 & 45,6 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

The table formatted a little different:
\documentclass{report}
\usepackage{booktabs}
% \usepackage{array}% It can also be loaded explicitly, implicitly it is
% loaded by siunitx
\usepackage{siunitx}
% \sisetup{output-decimal-marker={,}}% OP now wants to have the default dot
\sisetup{detect-weight, mode=text}
\newcommand*\rotbf[1]{\rotatebox{90}{\textbf{#1}}}
\newcommand{\specialcell}[2][b]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\newcommand{\specialcellbold}[2][b]{%
\bfseries
\sisetup{text-rm=\bfseries}%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}%
}
\newcommand*{\leftspecialcell}[2][b]{%
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}%
}
\begin{document}
\begin{table}[hbr]
\centering
\label{tbl:heatwheel_res}
\begin{tabular}{l*{3}{S[table-format=2.1]}}
\toprule
\textbf{Parameter} &
{\specialcellbold{Exhaust\\air}} &
{\specialcellbold{Exhaust and\\ outdoor air}} &
{\specialcellbold{Heat wheel\\(\SI{80}{\percent})}} \\
\midrule
Heat recovery [\si{\percent}] & 89,6 & 89,6 & 77,4 \\
Real heat recovery [\si{\percent}] & 50,5 & 52,1 & {---} \\
Net energy need for VH and SH & 27,7 & 27,0 & 15,8 \\
\leftspecialcell{Delivered energy for\\
\quad DHW, VH and SH} & 31,1 & 27,6 & 45,6 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

Remarks:
- Bottom aligned header row.
- Columns 2 to 4 are centered.
- Use of package
siunitx
for aligning at the decimal marker and for setting the percent signs.
- The lines after the first line in a left cell is indented.
and the alignment follows the bottom line instead of vertical
centering.
- Use of em dash instead of the hyphen for the missing entry.
- Redundant percent signs removed.
- Changed the output decimal marker to the default dot (see comment of ROLF).
- A little crude is
\siunit{text-rm=\bfseries}
. Option detect-weight
did not work inside an S
-column.
Update
I, Svend Tveskæg, found the code not very easy to read to I cleaned it up a bit (I hope it's okay):
\documentclass{report}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{
% output-decimal-marker = {,},
detect-weight,
mode = text
}
\newcommand*{\specialcell}[2][b]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}%
}
\newcommand*{\specialcellbold}[2][b]{%
\bfseries
\sisetup{text-rm = \bfseries}%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}%
}
\newcommand*{\leftspecialcell}[2][b]{%
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}%
}
\begin{document}
\begin{table}[htbp]
\centering
\label{tbl:heatwheel-res}
\begin{tabular}{l *{3}{S[table-format = 2.1]}}
\toprule
\textbf{Parameter} &
{\specialcellbold{Exhaust \\ air}} &
{\specialcellbold{Exhaust and\\ outdoor air}} &
{\specialcellbold{Heat wheel \\ (\SI{80}{\percent})}} \\
\midrule
Heat recovery [\si{\percent}] & 89,6 & 89,6 & 77,4 \\
Real heat recovery [\si{\percent}] & 50,5 & 52,1 & {---} \\
Net energy need for VH and SH & 27,7 & 27,0 & 15,8 \\
\leftspecialcell{Delivered energy for \\
\quad DHW, VH and SH} & 31,1 & 27,6 & 45,6 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Best Answer
Maybe I'm old-fashioned, but I still like simple tables: