This looks like a worksheet function, not VBA.
If so, it would be a simple matter of inserting the formula
in a cell, copying it HORIZONTALLY to the adjacent cells,
then MOVE the formula where you want it (if necessary).
If you are actually wanting to do this in VBA, then we can work
something out.
What is it you're trying to accomplish?
I think we need more specifics.