Problem with highlighting a row in a table
The text only looks relatively high in the coloured panel as you have tall characters like C and d and the digits and no characters with descenders other than a small part of the ()
However you can add a zero width rule with whatever height and depth you want to adjust the size of the content in the row:
\documentclass[11pt]{article}
\usepackage{color, colortbl,booktabs}
\definecolor{Gray}{gray}{0.9}
\begin{document}
\begin{table}[!htbp]
\centering
\begin{tabular}{llccc}
\midrule
&&Mean&Sigma&Total Points \& Costs\\
\midrule
2014 & Unused & 377 & 214 & 1,618,193\\ [0.5ex]
& Deducted & 213 & 141 & 565,792\\ [0.5ex]
& Carryover & 245 & 91 & 1,052,401 \\ [0.5ex]
& Used & 308 & 187 & 1,115,463\\ [0.5ex]
\rowcolor{Gray}
\rule[-1cm]{0pt}{2.4cm} & Costs (dollars) & 590 & 343 & 2,162,652 \\ [0.5ex]
\bottomrule
\end{tabular}
\end{table}
\end{document}
I propose this code, using makecell
and loading xcolor
with option table
– needless to load colortbl
, the option does it. I removed the thin white strip between the coloured row and the bottom, and used siunitx
for a better alignment of the numbers. Last I propose another shade of gray that pleases me better… :-)
\documentclass[11pt]{article}
\usepackage{booktabs, makecell}
\usepackage[table, svgnames]{xcolor}
\usepackage{siunitx}
\definecolor{Gray}{gray}{0.9}
\begin{document}
\begin{table}[!htbp]
\centering
\sisetup{table-format=3.0, table-number-alignment=center, group-separator={,}}
\setlength{\extrarowheight}{0.5ex}
\begin{tabular}{llSSS[table-format=7.0]}
\midrule
&&{Mean}&{Sigma}& {\makecell{Total Points \\[-0.5ex] \& Costs}} \\
\midrule
2014 & Unused & 377 & 214 & 1618193\\
& Deducted & 213 & 141 & 565792\\
& Carryover & 245 & 91 & 052401 \\
& Used & 308 & 187 & 1115463\\
\rowcolor{WhiteSmoke!70!Lavender}
& Costs (dollars) & 590 & 343 & 2162652 \\
\noalign{\vskip-\aboverulesep}
\bottomrule
\end{tabular}
\end{table}
\end{document}