Hi friends,
Please suggest me a code to insert a formula in visible cells range. I have filter the data and now I want to add a formula in a column 'ag9' '=IF(P9="","",DAY(P9))' and copy down in the visible cell range only.

Please suggest me a code to perform this action.

My data is in range 'b8:ag5000'. First I have filter the column 'ag' month, and now I want to delete that formula and insert the above mentioned formula in column 'ag' visible cell range filtered previously.

Thank you.

Regards,

Mukesh