Hi,

yes VBA can write to cells any Excel formula but as your forgot to share your working formula …