I'm working with a long table in and I'm having some issues with the it. I can't wrap the text in the last column, which uses multicolumn. Therefore, the text goes out of margins. Here's my code:
\usepackage{multirow}
\usepackage{makecell}
\begin{tabularx}{\textwidth}{XXXXXX}%[H]
\hline
Header that can be wrapped & Header 2 & Header 3 & Header 4 & Header 5 & Header 6\\
\hline
Data1 & 0.111 & 0.112 & 0.113 & 0.114 & \multirow{3}{*}{This text is too long and can not be wrapped}\\
Data2 & 0.221 & 0.222 & 0.223 & 0.224 & \\
Data3 & 0.331 & 0.332 & 0.333 & 0.334 & \\
\hline
\end{tabularx}
I've tried to force the line in the last column to break, but then it invades the cell below. This is what I've tried:
\usepackage{multirow}
\usepackage{makecell}
\begin{tabularx}{\textwidth}{XXXXXX}%[H]
\hline
Header that can be wrapped & Header 2 & Header 3 & Header 4 & Header 5 & Header 6\\
\hline
Data1 & 0.111 & 0.112 & 0.113 & 0.114 & \multirow{3}{*}{This text is too long and can not be wrapped}\\
Data2 & 0.221 & 0.222 & 0.223 & 0.224 & \\
Data3 & 0.331 & 0.332 & 0.333 & 0.334 & \\
\hline
Data4 & 0.111 & 0.112 & 0.113 & 0.114 & \multirow{2}{*}{Cell bellow}\\
Data5 & 0.221 & 0.222 & 0.223 & 0.224 & \\
\hline
\end{tabularx}
Any idea of how can I fix this situation?



\documentclass{...}and ending withend{document}; (ii) your second code fragment not produce the showed table ; (iii) ifmultirowcell has more lines than cell spanned by it, than its text will protrude in rows below (or above). in such a cases you need to make spanned cells higher. – Zarko May 26 '18 at 05:34