[Tex/LaTex] Missing vertical lines in the latex table

multicolumnmultirowtables

I am trying to create a \multirow and \multicolumn table in the Texmaker. I have specified to put vertical lines in the code but somehow my last column is missing partially the vertical line. I have posted my code below. Could someone help me out to understand where am I wrong?
Thanks a lot in advance.

\begin{table}[h]   
\centering   
\begin{tabular}{|p{3cm}|p{3cm}|p{3cm}|} \hline   
Macrophase & \multicolumn{2}{|c|}{Activity} \ \hline   
\multirow{8}{*}{} & Description & \ \cline{2-3}   
& Macrophase Actors \ \cline{2-3}   
& Duration and Frequency \ \cline{2-3}   
& Inputs \ \cline{2-3}   
& Software Utilized \ \cline{2-3}  
& Outputs \ \cline{2-3}  
& Criticalities \ \cline{2-3}  
& KPIs \ \hline  
\end{tabular}  
\caption{caption}  
\label{table:sample}  
\end{table}  

enter image description here

Best Answer

Please consider to remove all vertical lines - this will make the table much nicer to look at, see for example https://wiert.me/2014/04/03/andre-vatter-google-wie-tabellen-eigentlich-aussehen-sollten-%EF%BB%BF/

The problem is that you request the table to have 3 columns, but from the second row on, you only fill two of them. All rows need an additional & to get 3 columns.

\documentclass{article}

\usepackage{multirow}
\usepackage{array}
\usepackage{booktabs}

\begin{document}

\begin{table}[h]   
\centering   
\begin{tabular}{|p{3cm}|p{3cm}|p{3cm}|} 
\hline   
Macrophase & \multicolumn{2}{|c|}{Activity} \\ \hline   
\multirow{8}{*}{} & Description & \\ \cline{2-3}   
& Macrophase Actors & \\ \cline{2-3}   
& Duration and Frequency &\\ \cline{2-3}   
& Inputs &\\ \cline{2-3}   
& Software Utilized &\\ \cline{2-3}  
& Outputs &\\ \cline{2-3}  
& Criticalities &\\ \cline{2-3}  
& KPIs &\\ \hline  
\end{tabular}  
\caption{caption}  
\label{table:sample}  
\end{table}  

\end{document}

enter image description here

Related Question