I define a new command like this:
\newcommand{\rowcol}[4]{ %
\multicolumn{#1}{#3}{\multirow{#2}{*}{#4}} %
}
I then use it inside the column as,
\rowcol{2}{2}{|c|}{Factor}}&\multicolumn{2}{c|}{Replication}&Total \\ \cline{3-4}
Is there any mistake in doing this, I'm getting error.