[Tex/LaTex] How to insert multi-row and multi-column table in a same table in latex

multicolmultirowtables

I need help to create a multi-row and multi-column table in a same table.
The required table is given in the image below.

]1

Best Answer

enter image description here

\documentclass{article}
\usepackage{tabularx,multirow,array}
\usepackage[margin=1in]{geometry}
\begin{document}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}

\renewcommand{\arraystretch}{1.3}
\begin{table}[htbp]
\caption{Criteria used for selecting the time delay}
\label{MyTable}
\begin{tabularx}{\linewidth}{|X|L{7cm}|L{5cm}|C{2cm}|} \hline
\multirow{3}{*}{Zone 1} & \multicolumn{3}{L{14cm}|}{This zone operates without ...} \\ \cline{2-4} 
                        & \multicolumn{2}{L{12cm}|}{Medium Votage (MV) and High Voltage (HV)} & 20-30 ms \\ \cline{2-4} 
                        & \multicolumn{2}{L{12cm}|}{Extra-High Voltage (EHV)}                 & 15-25 ms \\ \hline
\multirow{2}{*}{Zone 2} & \multicolumn{3}{L{14cm}|}{Must allow zone 1 of neighboring ... Must allow zone 1 of neighboring ... Must allow zone 1 of neighboring ...} \\ \cline{2-4} 
                        & {Zone 1 operating time of protected line ... Zone 1 operating time of protected line ...}  & \multicolumn{2}{L{7cm}|}{(Referred above) from 2 cycles ... (Referred above) from 2 cycles ...} \\ \hline
Zone 3                  & \multicolumn{3}{L{14cm}|}{Same procedure as for Zone 2, wherein the operating time of Zone 1 of the protected line is replaced by ...} \\ \hline
\end{tabularx}
\end{table}

\end{document}

tabularx comes in handy for such big tables since it enables the table to occupy the total \linewidth. You will need the multirow package for these multi-line cells and the array package for defining new column types (C and L). The last three columns should be defined by specified width columns C or L because they interfere with each other. At least one column should be specified X to fill the remaining horizontal space.

\renewcommand{\arraystretch}{1.3} is used to give the table some vertical extension for readability. Finally, you may consider using booktabs for more beauty.