I would like to specify a table and if it has any multiline cells then it should be output as a single pair of columns and otherwise as two pairs of columns. For example, if it looks like the First Table in the code below then it should be output as is. If it looks like the Second Table in the code below then it should be output as the Third Table.
Firstly, how can I accomplish this? I tried to put the code in an \sbox but kept getting errors; however, even if I do that I don't know what the next step would be. ADDED Note that its ok to specify the data in the table twice in the latex code since I am generating this from a program.
Secondly, the code below gives rise to a ton of messages such as (\end occurred when \ifhmode on line 35 was incomplete) although it still runs. What do these messages mean? What do I do about them?
\documentclass{article}
\usepackage[top=1in,bottom=1in,left=0.5in,textwidth=7.5in]{geometry}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{tabu}
\usepackage{xcolor}
\begin{document}
First table.
\setlength{\columnseprule}{.4pt}
\renewcommand\columnseprulecolor{\color{blue}}
\begin{multicols}{2}
\tabulinesep=4pt
\noindent
\begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}
\everyrow{\tabucline[blue]-}
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
\end{tabu}
\tabulinesep=4pt
\noindent
\begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}
\everyrow{\tabucline[blue]-}
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & more / words \\
Some words & and some more \\
\end{tabu}
\end{multicols}
Second table.
\setlength{\columnseprule}{.4pt}
\renewcommand\columnseprulecolor{\color{blue}}
\begin{multicols}{2}
\tabulinesep=4pt
\noindent
\begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}
\everyrow{\tabucline[blue]-}
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
\end{tabu}
\tabulinesep=4pt
\noindent
\begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}
\everyrow{\tabucline[blue]-}
Some words & and some more \\
Some words & Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu- lum ut, placerat ac, adipiscing vitae, felis. \\
Some words & and some more \\
Some words & more / words \\
Some words & and some more \\
\end{tabu}
\end{multicols}
Third table.
\begin{center}
\tabulinesep=4pt
\noindent
\begin{tabu} to \columnwidth{>{\bfseries}l>{\strut\ignorespaces}X<{\ifhmode\unskip\strut}}
\everyrow{\tabucline[blue]-}
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & and some more \\
Some words & Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu- lum ut, placerat ac, adipiscing vitae, felis. \\
Some words & and some more \\
Some words & more / words \\
Some words & and some more \\
\end{tabu}
\end{center}
\end{document}
The result is:

ADDED
Note that there are some relationships to these posts:

