Vertical centering of text spanning multiple rows [duplicate]

Possible Duplicate:
How to vertically-center the text of the cells?

I am using multicolumn to create a table. The code that I have is here:

   \documentclass[10pt]{article}
\usepackage{multicol}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{2}{|c|}{Data A} & Data B \\\cline{1-2}
Set A1 & Set A2 &
\\\hline
a & b & c \           \hline
\end{tabular}
\caption{List of test cases.}
\label{tab:Tests}
\end{table}
\end{document}


This results in a table where the entry 'Data B' is aligned with the top hline of the table as in .

I would like to know how I can vertically center the entry ''Data B''. Any ideas would help a lot!

-

marked as duplicate by hpesoj626, Kurt, Werner, Guido, lockstepJan 8 '13 at 6:03

Not related to your question, but check out the booktabs package and the discussion regarding vertical lines in its manual. – You Jan 8 '13 at 0:04
You are loading but not using the multicol package in your MWE (it is unrelated to tables and is for making multi-column pages) the \multicolumn command doesn't require a package. – David Carlisle Jan 8 '13 at 0:05

Use multirow.

   \documentclass[10pt]{article}
\usepackage{multirow}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{2}{|c|}{Data A} & \multirow{2}{*}{Data B} \\\cline{1-2}
Set A1 & Set A2 &
\\\hline
a & b & c \\
\hline
\end{tabular}
\caption{List of test cases.}
\label{tab:Tests}
\end{table}
\end{document}


-