# Use multiple \multicolumn commands in a LaTeX table to achieve column headers

I'm trying to code column headers in LaTeX so that each header spans two columns; however, the following code isn't working:

\usepackage{booktabs}
\begin{tabular}{cccc}
\toprule
\multicolumn{2}{c}{Assets} \multicolumn{2}{c}{Liabilities and Equities} \\
\cmidrule(r){1-2} \cmidrule(r){3-4}
Cash & \$13,152 & Short position (200 shares owed) & \$13,152 \\
\bottomrule
\end{tabular}


Assets should span the first two columns, and Liabilities and Equities should span the second pair. When I compile this, I get this error:

Misplaced \omit.
\multispan ->\omit
\@multispan
l.221 ...lticolumn{2}{c}{Liabilities and Equities}

-

## migrated from stackoverflow.comDec 7 '11 at 0:03

This question came from our site for professional and enthusiast programmers.

It seems you are doing this correct, but left out the column separator (&)on that line.

\begin{tabular}{cccc}
\toprule
\multicolumn{2}{c}{Assets} & \multicolumn{2}{c}{Liabilities and Equities} \\
\cmidrule(r){1-2} \cmidrule(r){3-4}
Cash & \$13,152 & Short position (200 shares owed) & \$13,152 \\
\bottomrule
\end{tabular}


Gotta love those latex error descriptions!

-
LateX at 330 am... not a good combination. I just wasn't seeing it. Thank you very much. –  Ricardo Altamirano Sep 11 '11 at 2:26
I love using latex at 330 am in the morning.... ;-) –  Nicholas Hamilton Jun 7 '13 at 4:38
It appears I'm not the only one who uses LaTeX around 330am :| –  phiri May 4 at 1:31