[Tex/LaTex] Formatting a table with multiple headers using tabular like this

tables

I'm trying to set up a bunch of tables using the tabular package to summarise data at the end of my thesis. I've been trying to use examples given here to get what I'm envisioning, but I'm having difficulty.

The basic template I want to create looks like this:
enter image description here

I can't workout the following:

  1. How do I make the "time interval" have two rows while the two remaining columns are split into 2 rows as shown.

  2. How do I split the table first into 3 collumns and then 5 to get the effect shown.

My attempt at this has just given me butchered tables which make no sense, so I don't have any good example code to give.

Best Answer

For something as simple as this, you don't really need multirow.

\documentclass{standalone}
\begin{document}
\begin{tabular}{|l|c|c|c|c|}
\hline
\multicolumn{5}{|c|}{January 2010 Results} \\
\hline
\multicolumn{1}{|c|}{Trade} & \multicolumn{2}{c|}{A} & \multicolumn{2}{c|}{B}\\
\cline{2-5}
\multicolumn{1}{|c|}{Interval} & T & C & T & C \\
\hline
Afghanistan   & AF    &AFG&AFG&AFG\\
Aland Islands&   AX  & ALA&AFG&AFG   \\
Albania &AL & ALB&AFG&AFG\\
Algeria    &DZ & DZA&AFG&AFG\\
American Samoa&   AS  & ASM&AFG&AFG\\
Andorra& AD  & AND&AFG&AFG   \\
Angola& AO  & AGO&AFG&AFG\\
\hline
\end{tabular}
\end{document}

demo

Related Question