Hi Guys,
I have created a macro where I can drag and copy the forulma to the next column. The issue I am facing is this that I have created the command button on a seperate sheet and when I click it it runs the macro only if I place my cursor to the next column of the data sheet. My macro is as follows and I have attached the file to show where I would like to copy my formula (From Mar-13 to Apr-13) Please see the attached file.
Sub UpdateBS()
Sheets("YTD Balance Sheet").Select
' Keyboard Shortcut: Ctrl+b
'
ActiveCell.Offset(0, -1).Range("A1:A2").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B2"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B2").Select
ActiveCell.Offset(3, 0).Range("A1:A73").Select
Selection.AutoFill Destination:=ActiveCell.Range("A1:B73"), Type:= _
xlFillDefault
ActiveCell.Range("A1:B73").Select
ActiveCell.Offset(0, 1).Columns("A:A").EntireColumn.EntireColumn.AutoFit
ActiveCell.Offset(44, 1).Range("A1").Select
End Sub
Bookmarks