Search code examples
latexmultiple-columnstabularoverleafmultirow

Create table in Latex with multi-row and multi-column


I'm attempting to make a table in Latex, but I'm having trouble. I tried a variety of options, but none of them worked for me. I'd want to make a table similar to the one below: Here open the image

Can anyone show how to do this in Latex please?


Solution

  • Use the package multirow when you need to create such tables in Latex.You can create the table which you needed in latex like below :

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage{multirow}
    \title{Tables}
    
    \begin{document}
    \maketitle
    \begin{table}[htb]
    \begin{tabular}{|c|l|l|l|l|l|l|l|}
    \hline
    \multicolumn{1}{|l|}{A} & B & \multicolumn{2}{c|}{C} & \multicolumn{2}{c|}{D} & \multicolumn{2}{c|}{E} \\ \hline
    \multirow{2}{*}{F}      &   &            &           &            &           &            &           \\ \cline{2-8} 
                            &   &            &           &            &           &            &           \\ \hline
    \end{tabular}
    \end{table}
    \end{document}
    
    

    This results in a table like below which you wanted : enter image description here