# Tabularx - merge cells

I have a table made using tabularx and I'd like to merge some of the cells which have the same content so that only one entry is required. When I try to use multicolumn as per enter link description here but this skews the table when additional text is added.

Can I have advice on either a) fixing the problem using tabularx or b) a better package to accommodate large amounts of text and numbers?

I have attached an MWE and image of the output.

MWE

\documentclass[11pt,a4paper]{report}
\usepackage{color}
\usepackage{graphicx, epstopdf}
\usepackage{etoolbox}%This package combined with the \pathcmd rewrites the standard style for 'Chapter' to allow the fancy horizontal and vertical lines.
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{mystyle}}{}{}
\graphicspath{{../Visuals/}}
\usepackage{gensymb}
\usepackage{tabulary}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage,caption}
\usepackage[british]{babel}
\usepackage[backend=bibtex, citestyle=ieee, bibstyle=ieee]{biblatex}
\usepackage[section]{placeins}%Allows you to permanently fix figures.
\usepackage{titleps}%fancy page borders?
\usepackage[left=2.5cm, right=2.5cm, top=3.5cm, bottom=3.5cm]{geometry}
%\usepackage{caption}
\captionsetup[figure]{font=scriptsize,labelfont=scriptsize}
\usepackage{microtype}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{datetime}
\usepackage{lipsum}%random text generator. [1-XXXX] to specify the number of paragraphs.
\newdate{date}{28}{02}{2018}
\date{\displaydate{date}}
\onehalfspacing
\setcounter{secnumdepth}{3}

\newcolumntype{Z}{ >{\centering\arraybackslash}X }

\usepackage[autolanguage, np]{numprint}

\begin{document}

\begin{table}[!h]
\setlength\tabcolsep{4pt}
\caption{Caption}
\begin{tabularx}{\textwidth}{*{6}{Z}}
%\toprule
\multicolumn{4}{c}{} \\
\midrule
\thead{Test}  & \thead{Theoretical \\ Yield (mg)} & \thead{Flow \\ rates \\} & \thead{Residence \\ time, \\ $\tau$ (minutes)} & \thead{Temperature \\ ($\degree$C)} & \thead{Solvent} \\%
\midrule
1 & TEXT & TEXT & TEXT & TEXT & TEXT \\
2 & 70.0 & 64, 65, 71 & 10 & -15 & DCM \\
3 & 70.0 & 64, 65, 71 & 10 & 5 & DCM \\
4 & 70.0 & 64, 65, 71 & 10 & 10 & DCM \\
\bottomrule
\label{Label}
\end{tabularx}
\end{table}

\end{document}


• What do you mean by “skews the table”? Do you want to insert text to one row of your boxed part? Also, please remove the unnecessary packages to make your example code “minimal”. – Ruixi Zhang Aug 15 '18 at 21:18
• The only \multicolumn in your code has an empty content , so where is the problem? – Bernard Aug 15 '18 at 22:06

i guess that you looking for something like this:

\documentclass[11pt,a4paper]{report}
\usepackage{booktabs, makecell, multirow}
\usepackage[skip=1ex]{caption}
\usepackage{siunitx}

\begin{document}
\begin{table}[!h]
\caption{Caption}
\label{Label}
\setlength\tabcolsep{0pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} *{6}{c} }
\toprule
& \thead[b]{Residence \\ time $\tau$\\  (minutes)}