I want to make a box in second row. That is on 1 & 3 & 24 & 42 & 43.
Also on part of forth row 5 & 16 & 26 & 34.
\begin{tabular}{| c | c c c c | }
\hline
Location & \multicolumn{4}{c|}{Rounds}\\
\hline
0 & 2 & 23 & 41 & 42\\
1 & 3 & 24 & 42 & 43\\
2 & 4 & 25 & 43 & 44\\
3 & 5 & 16 & 26 & 34\\
4 & 6 & 17 & 27 & 35\\
\hline
\end{tabular}
Best Answer
There are better ways, as Werner alludes to, but here is a quick way, if you don't need to use it often (since the box width must be tailored to the content).
I have stuffed it into a macro
\boxit{<width>}
.If your
tabular
data is purely numeric, one could trim the height of the box to be symmetric about the numerals (the above solution uses a\strut
which allows extra depth for descenders). I also make the box in red, with a thicker (1pt) rule.