Hello

I need Vb code to do following
1) I have data in A18:F5000
2) I have filtered it based on Column D
Up to this level I could write vb code using recording macro.
Now I will Put formula in G18 and want to copy it to G19:G5000 but only to visible cells after filter.

Plese help. Hoe to go about this?