Welcome to the forum,

What version of Excel do you use?

Also a little confused, in the title you state: "VBA Code to replace"
But then in the main text you state: "But with no macros."