2

I have a table a latex table that simply won't close in the top right of the table (see picture). Not sure what the issue is but I appreciate your help.

\begin{tabular}{|l|c|c|c|llll|llll|}

\hline   
              &            & Age & Income & \multicolumn{4}{c}{Temperature (F$^\circ$)} &  \multicolumn{4}{c}{Trip Miles (miles)}   \\
              \hline  
MSA          & Population & Avg & Avg    & Med.   & Avg  & 10\%  & 90\%  & Med.  & Avg  & 10\%  & 90\%   \\

\hline  
New York      & 9,821,147    & 50  & 106    & 57       & 56   & 32    & 77    & 2.9     & 6.2  & 0.3   & 17.1  \\
Los Angeles   & 6,434,177    & 47  & 101    & 67       & 64   & 57    & 69    & 2.9     & 6.0  & 0.4   & 16.4  \\
Chicago       & 4,653,591    & 48  & 98     & 52       & 50   & 22    & 73    & 2.9     & 6.1  & 0.4   & 16.9  \\
Dallas        & 3,654,402    & 47  & 96     & 67       & 64   & 44    & 85    & 3.6     & 6.9  & 0.6   & 18.4  \\
Washington    & 3,320,895    & 46  & 122    & 59       & 57   & 35    & 79    & 2.8     & 5.9  & 0.3   & 16.4  \\
Houston       & 3,198,729    & 47  & 102    & 70       & 68   & 52    & 84    & 3.6     & 7.0  & 0.6   & 19.1  \\
Philadelphia  & 2,915,178    & 50  & 91     & 57       & 56   & 32    & 78    & 3.4     & 6.3  & 0.4   & 16.5  \\
Miami         & 2,912,751    & 52  & 84     & 79       & 77   & 68    & 84    & 3.2     & 5.9  & 0.5   & 15.1  \\
Atlanta       & 2,868251    & 47  & 89     & 63       & 61   & 43    & 80    & 4.0     & 7.2  & 0.6   & 18.8  \\
Boston        & 2,572,454    & 48  & 102    & 54       & 51   & 29    & 74    & 2.6     & 5.8  & 0.3   & 15.7  \\
San Fran. & 2,371,803    & 47  & 128    & 61       & 58   & 49    & 63    & 2.4     & 5.7  & 0.3   & 15.9  \\
Phoenix       & 2,182,537    & 51  & 87     & 75       & 72   & 54    & 93    & 3.5     & 6.9  & 0.6   & 19.1 \\
Seattle       & 1,997,545    & 47  & 108    & 51       & 52   & 40    & 68    & 3.2     & 5.9  & 0.4   & 15.4 \\
Detroit       & 1,980,465    & 49  & 87     & 52       & 51   & 25    & 74    & 4.0     & 7.3  & 0.6   & 19.9  \\

\hline \hline

\end{tabular}
\end{table}

enter image description here

3
  • I’m voting to close this question because it was answered in comment.
    – SebGlav
    May 31, 2021 at 20:57
  • 1
    @SebGlav -- Where are the comments you are referring to? Jun 1, 2021 at 0:18
  • I should not comment this late at night, sorry ;)
    – SebGlav
    Jun 1, 2021 at 5:07

1 Answer 1

5

You're missing a | from last multicolumn, replace it with \multicolumn{4}{c|}{Trip Miles (miles)}.

table

\documentclass[a4paper]{article}
\begin{document}
\begin{table}
\begin{tabular}{|l|c|c|c|llll|llll|}
\cline{3-12}   
              \multicolumn{2}{c|}{}            & Age & Income & \multicolumn{4}{c}{Temperature (F$^\circ$)} &  \multicolumn{4}{c|}{Trip Miles (miles)}   \\
              \hline  
MSA          & Population & Avg & Avg    & Med.   & Avg  & 10\%  & 90\%  & Med.  & Avg  & 10\%  & 90\%   \\

\hline  
New York      & 9,821,147    & 50  & 106    & 57       & 56   & 32    & 77    & 2.9     & 6.2  & 0.3   & 17.1  \\
Los Angeles   & 6,434,177    & 47  & 101    & 67       & 64   & 57    & 69    & 2.9     & 6.0  & 0.4   & 16.4  \\
Chicago       & 4,653,591    & 48  & 98     & 52       & 50   & 22    & 73    & 2.9     & 6.1  & 0.4   & 16.9  \\
Dallas        & 3,654,402    & 47  & 96     & 67       & 64   & 44    & 85    & 3.6     & 6.9  & 0.6   & 18.4  \\
Washington    & 3,320,895    & 46  & 122    & 59       & 57   & 35    & 79    & 2.8     & 5.9  & 0.3   & 16.4  \\
Houston       & 3,198,729    & 47  & 102    & 70       & 68   & 52    & 84    & 3.6     & 7.0  & 0.6   & 19.1  \\
Philadelphia  & 2,915,178    & 50  & 91     & 57       & 56   & 32    & 78    & 3.4     & 6.3  & 0.4   & 16.5  \\
Miami         & 2,912,751    & 52  & 84     & 79       & 77   & 68    & 84    & 3.2     & 5.9  & 0.5   & 15.1  \\
Atlanta       & 2,868251    & 47  & 89     & 63       & 61   & 43    & 80    & 4.0     & 7.2  & 0.6   & 18.8  \\
Boston        & 2,572,454    & 48  & 102    & 54       & 51   & 29    & 74    & 2.6     & 5.8  & 0.3   & 15.7  \\
San Fran. & 2,371,803    & 47  & 128    & 61       & 58   & 49    & 63    & 2.4     & 5.7  & 0.3   & 15.9  \\
Phoenix       & 2,182,537    & 51  & 87     & 75       & 72   & 54    & 93    & 3.5     & 6.9  & 0.6   & 19.1 \\
Seattle       & 1,997,545    & 47  & 108    & 51       & 52   & 40    & 68    & 3.2     & 5.9  & 0.4   & 15.4 \\
Detroit       & 1,980,465    & 49  & 87     & 52       & 51   & 25    & 74    & 4.0     & 7.3  & 0.6   & 19.9  \\

\hline \hline

\end{tabular}
\end{table}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .