and paste them in the cell right next to the cell in which the function is called.
Isso não é possível, as funções do VBA chamadas de uma fórmula na planilha não têm acesso a nenhuma outra célula na planilha.
Custom functions are not allowed to do anything other than return a value to a formula in a worksheet or to an expression used in another VBA macro or function. For example, custom functions cannot resize windows; edit a formula in a cell; or change the font, color, or pattern options for the text in a cell. If you include “action” code of this kind in a function procedure, the function returns the #VALUE! error.