Drag Formula Horizontally with Macro

Closed
namitasharma1512
Posts
3
Registration date
Thursday January 1, 2015
Status
Member
Last seen
January 10, 2015
- Jan 10, 2015 at 02:23 AM
Hello,


Just new to Excel. I have a problem and request if anyone can help me out.
I recorded a macro to paste column names in a formatted table and want the formula in first cell to be applied automatically. The formula is {=Table1[@[SALARY]:[SALARY]]*Table1[Column1]}. This works perfectly when I drag it horizontally. I want to avoid this dragging and want to do it with a macro. Thanking you in advance :)

PS:- The column names and number of columns to be pasted are variable, so range cannot be fixed