I'm following How to use \multirow to try and create a table. I have five columns and two rows, but the first column of the two rows need to be merged into one cell. The code I have is:
\documentclass{article}
\usepackage{multirow}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
\begin{table}[htbp]
\centering
\begin{tabular}{|P{6 cm}|P{2.7 cm}|c|P{2 cm}|P{2 cm}|}
\hline
A & B & C & D & E \\ \hline
\multirow{ 2}{*}{1} & 0 & 6 & 230 & 35 & \\
& 1 & 5 & 195 & 25 \\ \hline
\end{tabular}
\caption{A test caption}
\label{table2}
\end{table}
\end{document}
But the table I see looks like this
The vertical lines are broken, and I also need a horizontal line to separate the two rows in columns B,C,D, and E.
to allow column headers to be centered while having fixed widths.
What am I doing wrong?


&after 35. – leandriis Nov 06 '19 at 21:07&? – wrahool Nov 06 '19 at 21:08ltype columns instead ofptype ones. Probably, again also depending on the actual contents,tabularxcould also come in handy to ensure the table fits into the textwidth. – leandriis Nov 06 '19 at 21:08Extra alignment tab has been changed to \cr, and then prints the offending line. Reading the error messages is often difficult with TeX, but it can make your problem more obvious. – dgoodmaniii Nov 06 '19 at 21:10&since there are 11 columns used, but the35entry is in the tenth. You will therefore need a&to get a cotinuous vertical line at the right side of the table. In your example, you define 5 columns and the35already is in the fifth. With the&you would jump to the non existant sixth column, hence the "Extra alignment tab..." error that you get from your example. – leandriis Nov 06 '19 at 21:10