# Vertical Alignment & Text Wrapping using Multirow

I am facing issues in vertically aligning (and wrapping of) the text in a multirow table. I would accordingly appreciate some help in this regard from the estmeed community. Please see below:

\begin{table}
\caption{Story of Humpty Dumpty}
\centering
\begin{tabular}{c|c|c}
\hline
\multirow{3}{*}{Humpty Dumpty Sat} & on & \begin{tabular}[c]{@{}c@{}}the wall\\ and had a great fall  \end{tabular}\\ \cline{2-3}
& \begin{tabular}[c]{@{}c@{}} on\end{tabular} & \begin{tabular}[c]{@{}c@{}}the wall\\ and had a great fall \end{tabular}\\ \cline{2-3} & \begin{tabular}[c]{@{}c@{}}on\\ \end{tabular} & \begin{tabular}[c]{@{}c@{}}the wall\\ and had a great fall\end{tabular} \\ \hline
\end{tabular}
\end{table}


I am looking to achieve the following:

• please have a look at the answer below - note that \multirow{5}{*}{Humpty Dumpty Sat} can also take decimal values for fine vertical alignment as well as negative values such as 5.2 etc -- \multirow{5.2}{*}{Humpty Dumpty Sat} -- adapt to taste Nov 22 '20 at 0:58

vertical alignment

 \multirow{5}{*}{Humpty Dumpty Sat} & on & \begin{tabular}[c]{@{}c@{}}the wall\\ and had a great fall  \end{tabular}\\ \cline{2-3}


additionally to wrap the text in multirow

\multirow{5}{0.2\textwidth}{\centering Humpty Dumpty Sat}

• Thanks a million. This settles it :-). Nov 22 '20 at 1:58
• @Qureshi do upvote if you have the urge Nov 22 '20 at 1:59

Alternatively, with shorter code which employ m type of columns and center setting for multirow cells:

\documentclass{article}
\usepackage{array, multirow}

\begin{document}
\begin{table}
\caption{Story of Humpty Dumpty}
\centering
\renewcommand\multirowsetup{\centering} % <---
\renewcommand\arraystretch{1.3}
\begin{tabular}{p{6em}|c|>{\centering\arraybackslash}m{8em}} <---
\hline
\multirow{4.5}{=}{Humpty Dumpty Sat} % 4.5=6 spanned lines-2 lines text + 0.5 line for gaps in rows
& on    & the wall and had a great fall \\ \cline{2-3}
& on    & the wall and had a great fall \\ \cline{2-3}
& on    & the wall and had a great fall \\
\hline
\end{tabular}
\end{table}
\end{document}
`