# Complex tables with multiple rows and columns and text in vertical

I am having difficulties with making this table, as it has multiple columns and rows and some text in vertical.

Does anybody know what commands should I use?

Thank you

• Welcome to TeX - LaTeX! There are many questions about tables here with solutions. Try to use one as model and if you can't get it to work, then update your question with the code you have tried so far. Also read the documentation of the booktabs package about good design of tables. Dec 1 '18 at 18:44
• do your "text" in cells is only one line long or more? do you like to have more vertical space around those words? your question is not clear about this ... Dec 1 '18 at 21:33

Combining \multirow and \multicolumn:

\documentclass{article}

\usepackage{graphicx}
\usepackage{multirow}

\begin{document}

\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{} & \multicolumn{2}{|c|}{Managment B}\\
\cline{3-4}
\multicolumn{2}{|c|}{\multirow{-2}{*}{}} & yes & no\\
\hline
\multirow{2}{*}{\rotatebox{90}{Managment A }} & yes & 1 & 2\\[0.8cm]
\cline{2-4}
& yes & 3 & 4\\[0.8cm]
\hline
\end{tabular}

\end{document}


your question is not clear ... is the provided images is all what you like to present in your table or is text in cells longer and not be single wort "text" as it is shown.

assuming, that instead "text" in those cells will be longer text, than the following solution may help you:

\documentclass{article}
\usepackage{rotating}
\usepackage{makecell, multirow, tabularx}
\newcommand\mcbf[1]{\multicolumn{1}{>{\bfseries}c|}{#1}}

\usepackage{lipsum} % for dummy text

\begin{document}

\begin{table}
\centering
\sffamily
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{|c|c|X|X|}
\hline
\multicolumn{2}{|c|}{}
\cline{3-4}
\multicolumn{2}{|c|}{}
\hline
&   YES     &   \mcbf{Group 1}     &   \mcbf{Group 2}       \\
&           &   Sed feugiat. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur
ridiculus mus.      &   text                \\
\cline{2-4}
&   NO      &   \mcbf{Group 3}     &   \mcbf{Group 4}       \\
&           &   Sed feugiat. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur
ridiculus mus.      &   text                \\
\hline
\end{tabularx}
\end{table}
\end{document}