Giving example...

I have column B, C has 20k record values, and want to insert formula in E (i.e. active cell (first cell)), so now write formula in E column, apply the same formula for all cells in E column.

This is what i need and i want to automate that through macro, so when i will do it in Excel it works without any issue.

but when i record macro to generate the code for that, it's not giving complete formula and it's giving error even i am trying to execute through code.