# Adding double vertical line in one column

I'm trying to add a vertical double line to the horizontal one using \hhline. I want to add this double vertical line after column Year, before (a,b) in my table (the second line from the left). I want this new vertical double line to go from the top, down to the bottom of the table.

My code is:

  \begin{table}[h!]
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Year & a & c &e & g\\
&b & d &   f &h \\ \hhline{|=|=|=|=|=|}
1995 & 423 & 1049.5 & 3.4 & 31.1 \\ \hline
1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline
1997 & 209 & 1069.1* & 3.5 & 30.8\\ \hline
1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline
1999 & 322  & 1386.1 &4.2 & 32.9\\ \hline
2000 & 507 & 1633.9 & 5.0&32.7 \\ \hline
2001 & 472 & 1515.5 & 4.5&34.0\\ \hline
\end{tabular}
\end{center}

\end{table}


What do I do to improve it? I tried searching other threads but I couldn't get the solutions to work for me.

• Welcome to TeX.SX! Please complete your code with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand, it's easier for us just copy-paste and run it. Feb 20, 2017 at 17:21
• don't use just h it usually generates a warning, better to use [htp] otherwise it is more likely the table goes to the end of the document. Also only use ! in exceptional cases where you want to ignore the current settings. Feb 20, 2017 at 17:30

You don't need \hhline for this:

\begin{center}
\begin{tabular}{|c||c|c|c|c|c|}
\hline
Year & a & c &e & g\\
&b & d &   f &h \\ \hline\hline  % \hhline{|=|=|=|=|=|}
1995 & 423 & 1049.5 & 3.4 & 31.1\\ \hline
1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline
1997 & 209 & \phantom{*}1069.1*& 3.5 & 30.8\\ \hline
1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline
1999 & 322 & 1386.1 & 4.2 & 32.9\\ \hline
2000 & 507 & 1633.9 & 5.0 & 32.7\\ \hline
2001 & 472 & 1515.5 & 4.5 & 34.0\\ \hline
\end{tabular}
\end{center}


• Unrelated to the main question, but what does the use of \phantom do here? Nov 4, 2022 at 17:25

Vertical double-lines that cross double horizontal lines (=) require #. However, I'd go with a more open, booktabs presentation:

\documentclass{article}

\usepackage{hhline,booktabs}

\begin{document}

\begin{tabular}{|c||c|c|c|c|c|}
\hline
Year & a & c &e & g\\
&b & d &   f &h \\
\hhline{|=#=|=|=|=|}
1995 & 423 & 1049.5 & 3.4 & 31.1\\ \hline
1996 & 224 & 1009.9 & 3.2 & 31.0\\ \hline
1997 & 209 & 1069.1\rlap{*} & 3.5 & 30.8\\ \hline
1998 & 298 & 1270.9 & 4.0 & 31.9\\ \hline
1999 & 322 & 1386.1 & 4.2 & 32.9\\ \hline
2000 & 507 & 1633.9 & 5.0 & 32.7\\ \hline
2001 & 472 & 1515.5 & 4.5 & 34.0\\ \hline
\end{tabular}

\bigskip

\begin{tabular}{ *{6}{c} }
\toprule
& a & c & e & g \\
Year & b & d & f & h \\
\midrule
1995 & 423 & 1049.5 & 3.4 & 31.1 \\
1996 & 224 & 1009.9 & 3.2 & 31.0 \\
1997 & 209 & 1069.1\rlap{*} & 3.5 & 30.8 \\
1998 & 298 & 1270.9 & 4.0 & 31.9 \\
1999 & 322 & 1386.1 & 4.2 & 32.9 \\
2000 & 507 & 1633.9 & 5.0 & 32.7 \\
2001 & 472 & 1515.5 & 4.5 & 34.0 \\
\bottomrule
\end{tabular}

\end{document}