Sub copy_down_paste_calcV2()
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, -1).End(xlDown).Offset(0, 1))
Selection.EntireColumn.Select
If TypeName(Selection) = "Range" Then Selection.Calculate
Selection(2).Select
End Sub
I'm experiencing problems achieving something that to me seems rather simple.
I am hoping to get this code to refer to the last cell in column A, and not to the column to its immediate left, as the indicator of the last row for the autofill to reach.
-Column A is text, has no blank cells.
I use this many times on the same sheet, in different columns, therefore the "offset" idea appears to not be where i need to be?
I have found no solutions which do not require the actual column to be referenced. So i am looking for a generic/active-column solution to be used in any column of choice, with the autofill going down to the last row of data on Column A, and overriding any cells that are in the column. That is why i have added the "Selection.EntireColumn.Select."
It may be an ugly code, as i am not a pro, but it works efficiently on my large files (900,000 rows) so far.
Thanks in advance for any assistance.
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, -1).End(xlDown).Offset(0, 1))
Selection.EntireColumn.Select
If TypeName(Selection) = "Range" Then Selection.Calculate
Selection(2).Select
End Sub
I'm experiencing problems achieving something that to me seems rather simple.
I am hoping to get this code to refer to the last cell in column A, and not to the column to its immediate left, as the indicator of the last row for the autofill to reach.
-Column A is text, has no blank cells.
I use this many times on the same sheet, in different columns, therefore the "offset" idea appears to not be where i need to be?
I have found no solutions which do not require the actual column to be referenced. So i am looking for a generic/active-column solution to be used in any column of choice, with the autofill going down to the last row of data on Column A, and overriding any cells that are in the column. That is why i have added the "Selection.EntireColumn.Select."
It may be an ugly code, as i am not a pro, but it works efficiently on my large files (900,000 rows) so far.
Thanks in advance for any assistance.