\documentclass[twocolumn]{memoir}
\setaftersecskip{0em}
\setsecheadstyle{\large \normalfont \bfseries \centering \MakeUppercase }
\setsecnumformat{ \csname the#1\endcsname\par\nobreak \rule{\columnwidth}{0.2mm} \par\nobreak }
\begin{document}
\section {Test Section}
\end{document}
The section title should be centered as the number.
May be \centering
stops his effect after first \par
(tried to change with \\
but no effect) in \setsecnumformat
, I don't know how to restore it or to make it effective for the whole title. Any hint?