# Subdividing a column in a tabular

I recently had to make a table that came out more or less like this:

\begin{tabular}{|l|l|l|}
\hline
\hline
1 & \multicolumn{2}{|c|}{A}\\ \hline
2 & \multicolumn{2}{|c|}{B}\\ \hline
3 & \multicolumn{2}{|c|}{C}\\ \hline
4 & Da & Db \\ \hline
5 & \multicolumn{2}{|c|}{E}\\ \hline
6 & \multicolumn{2}{|c|}{F}\\ \hline
\end{tabular}


I was wondering whether it is possible to specify that the row starting with 4 has its second column subdivided instead of specifying that all the other rows have a cell that spans multiple columns.

-

Use a nested tabular:

\begin{tabular}{|l|c|}
\hline
\hline
1 & A\\ \hline
2 & B\\ \hline
3 & C\\ \hline
4 & \begin{tabular}{@{}c|c@{}}Da & Db\end{tabular} \\ \hline
5 & E\\ \hline
6 & F\\ \hline
\end{tabular}


However you should consider avoiding vertical rules in your table; consult the documentation of the booktabs package.

-
Actually, I always use the booktabs package and never use vertical rules, but I copied this example from somewhere else as it illustrates my problem and my own tables were a bit too large to paste here. –  nvcleemp Jun 26 '12 at 14:27
@nvcleemp The method with a nested tabular may need some fine tuning, depending on the cell that must be split. But it's quite general: for instance it's very handy also for spitting a cell vertically. –  egreg Jun 26 '12 at 14:34