[Tex/LaTex] Table Missing Column Lines! Help!

multicolumnmultirowtables

I'm trying to write up a table but I'm missing the vertical rows in the last few columns. Anyone have any clues as to how to fix this?

 \setlength\tabcolsep{4pt}
 \begin{tabular}{|l|l|l|l|l|}
 \cline{2-5} 
 \multicolumn{1}{l|}{} & Autumn & Pre-requisites & Spring & Pre-requisites \\\hline 
 \multirow{4}{*}{\textbf{Year 1}} & MATH187 & Either a mark of at least 80 in \\ & & MATH151 OR (in the NSW HSC \\ & & Examination) Mathematics Band \\ & & 4; or Mathematics Ext 1. & MATH188 & MATH187 \\\cline{2-5}  
                             & MATH100 & None & MATH123 & MATH187 or MATH141 with \\ & & & & co-requisites of MATH188 \\ & & & & or MATH142 \\\cline{2-5} 
                             & CSIT110 & None & STAT101 & None \\\cline{2-5}                                         
                             & ACCY111 & None & ACCY112 & ACCY112 \\\hline \hline     
 \multirow{4}{*}{\textbf{Year 2}} & MATH201 & One of MATH110, MATH188 or \\ & & MATH283, or a mark of at least \\ & & 75 in MATH142 or MATH162, or \\ & & enrolment in course code 762A. & MATH202 & MATH201 \\\cline{2-5} 
                             & MATH203 & One of MATH101, MATH188 or \\ & & MATH283 or enrolment in course \\ & & code 762A. & MATH204 & MATH201 \\\cline{2-5} 
                             & MATH222 & One of MATH101, MATH188 or \\ & & enrolment in course code 762A & MATH212 & One of MATH101, MATH188, \\ & & & & MATH283 or enrolment in \\ & & & & course code 762A \\\cline{2-5}     
                             & STAT231 & MATH188 or enrolment in \\ & & course code 762A. & STAT232 & STAT231 \\\cline{2-5} 
\hline
\end{tabular}

The output I get for the code above is:
enter image description here

Best Answer

A version with package booktabs and less lines, column type X of tabularx for a p column type that adapts to the available width:

\documentclass{article}
\usepackage{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}
                {ll>{\raggedright}Xl>{\raggedright\arraybackslash}X}
  \toprule
  & Autumn & Pre-requisites & Spring & Pre-requisites \\
  \midrule
  \textbf{Year 1} & MATH187
  & Either a mark of at least 80 in
    MATH151 OR (in the NSW HSC
    Examination) Mathematics Band~4; or Mathematics Ext~1.
  & MATH188 & MATH187 \\
  \cmidrule{2-5}
  & MATH100 & None & MATH123
  & MATH187 or MATH141 with co-requisites of MATH188
  or MATH142 \\
  \cmidrule{2-5}
  & CSIT110 & None & STAT101 & None \tabularnewline
  \cmidrule{2-5}
  & ACCY111 & None & ACCY112 & ACCY112 \tabularnewline
  \midrule
  \textbf{Year 2} & MATH201
  & One of MATH110, MATH188 or MATH283, or a mark of at least
    75 in MATH142 or MATH162, or enrolment in course code 762A.
  & MATH202 & MATH201 \\
  \cmidrule{2-5}
  & MATH203
  & One of MATH101, MATH188 or MATH283 or enrolment in course
    code 762A.
  & MATH204 & MATH201 \\
  \cmidrule{2-5}
  & MATH222
  & One of MATH101, MATH188 or enrolment in course code 762A
  & MATH212 & One of MATH101, MATH188, MATH283 or enrolment in
    course code 762A \\
  \cmidrule{2-5}
  & STAT231
  & MATH188 or enrolment in course code 762A.
  & STAT232 & STAT231 \\
  \bottomrule
\end{tabularx}
\end{document}

Result

Or with even less lines by replacing \cmidrule{2-5} by `\addlinespace:

Result

Related Question