[Tex/LaTex] Table Header with vertically centered alignment

header-footerhorizontal alignmenttablesvertical alignmentxetex

I'm creating table header using LaTeX code mentioned below:

\begin{center}
\begin{tabular}{|c|l|c|c|c|c|}
\hline
$\textbf{Q }$&$\textbf{Header one}$&$\textbf{Test} $&$\textbf{Test1}$&$\textbf{Test2}$&$\textbf{Test3}$\\
$ $&$ $&$\textbf{Text4} $&$\textbf{Text5}$&$\textbf{Text6}$&$\textbf{Text7}$\\
$ $&$ $&$ $&$$&$$&$\textbf{Text8}$\\
\hline
\end{tabular}
\end{center}$

Can you please suggest, how can I arrange this vertically aligned centrally?
[Note: I'm looking for option to centrally align text inside header, which is currently spread across three lines.]

Best Answer

A new verion, after clarification. No additional packages used. Each column is a separate table. $'s left, however rather unneeded.

\documentclass{article} 

\begin{document}

\def\barr{\begin{tabular}{l}}
\def\earr{\end{tabular}}

\begin{tabular}{|c|l|c|c|c|c|}
\hline
$\textbf{Q }$&
\barr 
$\textbf{Header one}$
\earr &
\barr
$\textbf{Test}$\\
$\textbf{Text4} $\\
\earr &
\barr
$\textbf{Test1}$\\
$\textbf{Text5}$
\earr &
\barr
$\textbf{Test2}$\\
$\textbf{Text6}$
\earr &
\barr
$\textbf{Test3}$\\
$\textbf{Text7}$\\
$\textbf{Text8}$
\earr\\
\hline
\end{tabular}


\end{document}

enter image description here

Related Question