Rather than explain, here's an MWE which should be clear:
-------> this works
Code: Select all
\documentclass{article}
\begin{document}
\newcommand{\cols}{ccc}
\begin{tabular}[t]{\cols}
blah & blah & blah \\
blah & blah & blah \\
\end{tabular}
\end{document}
Code: Select all
\documentclass{article}
\begin{document}
\newcounter{n}
\newcommand{\repeatntimes}[2]{ % usage \repeatntimes{c}{3} -> ccc
\setcounter{n}{0}%
\loop\addtocounter{n}{1}{#1}%
\ifnum\value{n}<#2\repeat}
\newcommand{\cols}{\repeatntimes{c}{3}}
\begin{tabular}[t]{\cols}
blah & blah & blah \\
blah & blah & blah \\
\end{tabular}
\end{document}
Anyway, any help would be greatly appreciated

Bev