[Tex/LaTex] Vertical lines only in certain columns

linetablesvertical

For a table in my thesis I want to show a verti
cal line only spanning 3 out of 5 columns.

My current table is:

\begin{table}[h]
\centering
\captionsetup{singlelinecheck=false}
\caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
\label{t:praeppcrcycler}
\centering
\begin{tabular}{lll}
\midrule
Temperatur & Zeit & \\
\midrule
98 \si{\degreeCelsius} & 3 min &  \\
& & \\

98 \si{\degreeCelsius} & 30 s &    \\
58 \si{\degreeCelsius} & 20-30 s & 30-35x \\
72 \si{\degreeCelsius} & 20-60 s &  \\

& & \\
72 \si{\degreeCelsius} & 3 min & \\
4 \si{\degreeCelsius} & $\infty$ & \\
\end{tabular}
\end{table}

which gives me this table
enter image description here

I do however want to add a vertical line spanning column 3, row 3 to 5 as in this picture
enter image description here

Any help is appreciated!

Best Answer

Here it is. I slightly simplified and improved your code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{booktabs, caption, multirow, siunitx}

\begin{document}

\begin{table}[!htb]
  \captionsetup{singlelinecheck=false, justification=RaggedRight}
  \sisetup{range-phrase=--, range-units=single}
  \caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
  \label{t:praeppcrcycler}
  \centering
  \begin{tabular}{lll}
    \midrule
    Temperatur & Zeit & \\
    \midrule
    \SI {98}{\celsius} & \phantom{0}\SI{3}{min} & \\
                                     & & \\
    \SI{98}{\celsius} & \SI{30}{s} & \multicolumn{1}{|c}{} \\
    \SI{58}{\celsius} & \SIrange{20}{30}{s} & \multicolumn{1}|c}{30–35$\times$} \\
    \SI{72}{\celsius} & \SIrange{20}{60}{s} & \multicolumn{1}{|c}{} \\
                                     & & \\
    \SI{72}{\celsius}& \phantom{0}\SI{3}{min} & \\
    \phantom{0}\SI{4}{\celsius} & \phantom{0}$\infty$ & \\
    \midrule
  \end{tabular}
\end{table}

\end{document} 

enter image description here