1

I can't use multi-row with multi column, my aim in the following code is to have a two height row with the content A long header vertically centered in two rows, what am I missing here?

\begin{table*}
\centering 
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\linewidth}{|l|C|C|C|C|C|C|}
\hline
\bf{} & \multirow{2}{*}{\bf{Value}} & \multirow{2}{*}{\bf{Value}} & \bf{Some Value} & \bf{ome Value} & \multirow{2}{*}{\bf{ome Value}} & \multirow{2}{*}{\bf{Value}}
\\ \hline
\multicolumn{7}{|c|}{\multirow{2}{*}{A long header vertically centered in two rows}}
\\ \hline
\bf{Row header} & 12.34 & 12.34 & 12.34 & 12.34 & 12.34 & 12.34
\\ \hline
\end{tabularx} 
\caption{Table results}
\label{results} 
\end{table*} 
1
  • 1
    Please don't use \bf{text} use \textbf{text}
    – touhami
    May 2, 2015 at 20:10

1 Answer 1

1

you should read how multirow works

\begin{table*}
\centering 
\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\linewidth}{|l|C|C|C|C|C|C|}
\hline
\textbf{} & \multirow{2}{*}{\textbf{Value}} & \multirow{2}{*}{\textbf{Value}} & \textbf{Some Value} & \textbf{ome Value} & \multirow{2}{*}{\textbf{ome Value}} & \multirow{2}{*}{\textbf{Value}}
\\ \hline
\multicolumn{7}{|c|}{\multirow{2}{*}{A long header vertically centered in two rows}}
\\ \multicolumn{7}{|c|}{} % add
\\ \hline
\textbf{Row header} & 12.34 & 12.34 & 12.34 & 12.34 & 12.34 & 12.34
\\ \hline
\end{tabularx} 
\caption{Table results}
\label{results} 
\end{table*} 

You must log in to answer this question.