What is the best way to make the red text fit the width of the merged cells/rows and automatically break the line instead of causing overflow to the next cell and cells content ?
PS: I never used package tabularx.
Code:
\documentclass[a4paper]{report}
\usepackage{multirow}
\usepackage{array}
\usepackage{color}
\begin{document}
\begin{table}[h]
\begin{center}
\renewcommand{\arraystretch}{3}
\begin{tabular}{|p{2,5cm}|p{2,5cm}|p{3cm}|p{2cm}|p{2cm}|}
\hline
\multirow{2}*{\textcolor{red}{this is a long text long}} & \multirow{2}*{here is a text} & \multirow{2}*{\textcolor{red}{this is a long text long}} & \multicolumn{2}{c|}{text}\\
\cline{4-5}
& & & \textcolor{green}{it works here text} & here is a text\\
\hline
\multirow{3}*{text} & \multirow{3}*{\textcolor{red}{this is a long text long long}} & \textcolor{green}{split like this long text } & \multirow{3}*{text} & \multirow{3}*{text}\\
& & text & \\
& & text & \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
The code follows: How do i get a table with this layout?
*
for multirow so it uses p column formatting