I am trying to color a multirow in my table, but without success until now:
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{colortbl}
\usepackage{multicol}
\begin{document}
\begin{table}
\begin{tabular}{|l|c|c|c|c|}
\hline
\multicolumn{5}{|c|}{Type} \\
\hline
& A & B & C & D \\
\hline
X & 53,2\% & 51,6\% & \multirow{2}{*}{\cellcolor[gray]{.9}49\%} & \multirow{2}{*}{\cellcolor[gray]{0.9}49\% }\\
Y & 53,8\% & 52,2\% & & \\
\hline
\end{tabular}
\end{table}
\end{document}
What should I do, so that the two last multirow-cells get completely grey-colored?
Best Answer
First color the upper cells by issuing
\cellcolor[gray]{0.9}
and then use\multirow
n the second row. Note-2
in\multirow{-2}{*}{...}
. This will make multi row to grow upwards.