This shows how to create a macro and a savebox for later use. Note that the savebox increments the table counter immediately.
This is a demonstration, not a solution.
\documentclass{article}
\usepackage{caption}
\newsavebox{\appboxB}
\begin{document}
\section{Test}
Example text.
\newcommand{\appendA}{%
\begin{table}[htp]
\caption{Macro}
\end{table}%
}
\savebox{\appboxB}{%
\begin{minipage}{\columnwidth}
\captionof{table}{Savebox}
\end{minipage}%
}
\appendix
\section{Here}
\appendA
\begin{table}[htp]
\usebox{\appboxB}
\end{table}
\end{document}
This is a solution. It saves a list of global macros to be expanded in the appendix. \appendset saves the float, and \appendlist expands all of them.
\documentclass{article}
\newcounter{appendix}
\newcommand{\appendset}[1]% #1 = float to be expanded later
{\stepcounter{appendix}%
\expandafter\gdef\csname append\theappendix\endcsname{#1}%
}
\newcommand{\appendlist}% expand previously saved floats
{\bgroup
\count1=0
\loop\ifnum\count1<\value{appendix}\relax
\advance\count1 by 1
\csname append\the\count1\endcsname
\repeat
\egroup}
\begin{document}
\section{Test}
Example text.
\appendset{%
\begin{table}[htp]
\caption{First}
\end{table}%
}
\appendset{%
\begin{table}[htp]
\caption{Second}
\end{table}%
}
\appendix
\section{Floats}
\appendlist
\end{document}
With the exception of requiring a \clearpage at the start, one can do the same thing using the endfloat package.
\documentclass{article}
\usepackage[nolists,noheads,nomarkers]{endfloat}
\renewcommand{\efloatseparator}{\null}
\begin{document}
\section{Test}
Example text.
\begin{table}[htp]
\caption{First}
\end{table}
\begin{table}[htp]
\caption{Second}
\end{table}
\appendix
\section{Floats}
\clearpage% required
\processdelayedfloats
\section{Optional}
\end{document}