1

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

enter image description here

  • 1
    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. – Andrew Swann 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 ... – Zarko Dec 1 '18 at 21:33
2

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}

enter image description here

0

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}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadgape{}
\newcommand\mcbf[1]{\multicolumn{1}{>{\bfseries}c|}{#1}}

\usepackage{lipsum} % for dummy text

\begin{document}

    \begin{table}
    \centering
    \sffamily
    \settowidth\rotheadsize{ Management A }
    \setcellgapes{3pt}
    \makegapedcells
\begin{tabularx}{\linewidth}{|c|c|X|X|}
    \hline
\multicolumn{2}{|c|}{}
                & \multicolumn{2}{c|}{ \thead{Management B}}    \\
    \cline{3-4}
\multicolumn{2}{|c|}{}
                &   \thead{YES}     &   \thead{NO}              \\
    \hline
\multirow{10}{*}{\rothead{Management A}}
    &   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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.