I want to create something like this:
Can someone explain how to do it?
I want to create something like this:
Can someone explain how to do it?
See this answer too. Here's a sketch for you, using indeed multirow
package:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|c|c|c|c|}
\hline
\multirow{2}{*}{1} & \multirow{2}{*}{2} & \multicolumn{2}{|c|}{3}\\
\cline{3-4}
& & 3a & 3b\\
\hline
& & & \\
\end{tabular}
\end{document}
As already said in comments, the tabularray
packages makes it really easy to merge cells:
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{
colspec={cccc},
vlines,
hlines,
}
\SetCell[r=2]{} 1 & \SetCell[r=2]{} 2 & \SetCell[c=2]{} 3\\
& & 3a & 3b\\
& & & \\
\end{tblr}
\end{document}