I have the following macro, which does what I need it to do, copy data from one column to another.
ApplicationCalculation = xlCalculationManual
Application.EnableEvents = False
Application ScreenUpdating = False
Range("T31:T549").Select
Selection.Copy
Range("E31").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Application.EnableEvents = False
Application ScreenUpdating = False
ApplicationCalculation = xlCalculationAutomatic
Three questions:
1) This macro now copies the data from row 31 to row 549 which are all the rows currently in the Worksheet. How can I adapt the macro to allow for new rows being added at row 31, which will push old row 31 down to row 32, and old row 549 down to 550 ?? Said another way, how can I adapt the macro to copy all of the rows, even when new rows are added ??
2) This macro now copies data from Column T to Column E.
Is there a way to adapt this macro so that when columns are added or deleated, that the data will still be copied correctly -- that is from what was originally Column T to the column that was originally Column E ??
3) What do I need to do to this macro to have it activate whenever the worksheet is Calculated ?? (The columns in question have no user entered data in them. All the data in the columns is the result of calculations)
Thanks
StanSz
ApplicationCalculation = xlCalculationManual
Application.EnableEvents = False
Application ScreenUpdating = False
Range("T31:T549").Select
Selection.Copy
Range("E31").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Application.EnableEvents = False
Application ScreenUpdating = False
ApplicationCalculation = xlCalculationAutomatic
Three questions:
1) This macro now copies the data from row 31 to row 549 which are all the rows currently in the Worksheet. How can I adapt the macro to allow for new rows being added at row 31, which will push old row 31 down to row 32, and old row 549 down to 550 ?? Said another way, how can I adapt the macro to copy all of the rows, even when new rows are added ??
2) This macro now copies data from Column T to Column E.
Is there a way to adapt this macro so that when columns are added or deleated, that the data will still be copied correctly -- that is from what was originally Column T to the column that was originally Column E ??
3) What do I need to do to this macro to have it activate whenever the worksheet is Calculated ?? (The columns in question have no user entered data in them. All the data in the columns is the result of calculations)
Thanks
StanSz