Hi,
Please help me to find the code what I am looking for..Tried a lot of variation but I couldn't make the perfect code.
So the situation is I made a riport every day and I have to copy the data from another file under the previous days lines. This part is working. After that I have to fill cells in U:AM columns which are contain formulas. I want to fill that columns with the formulas from the previous days, until the last data in A or B or any columns until T(because every columns have data from A-T).
This is how my codes looks like:
Dim lastRow As String
lastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row + 1
Range("A" & lastRow).Select
Selection.PasteSpecial
Application.CutCopyMode = False
Range("U" & lastRow - 1).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.AutoFill Destination:=
Here I selected the cells with formulas which I want to fill and I am stucked at what destination should I use to fill only until the last used cell of A-T.
Many thanks,
David
Please help me to find the code what I am looking for..Tried a lot of variation but I couldn't make the perfect code.
So the situation is I made a riport every day and I have to copy the data from another file under the previous days lines. This part is working. After that I have to fill cells in U:AM columns which are contain formulas. I want to fill that columns with the formulas from the previous days, until the last data in A or B or any columns until T(because every columns have data from A-T).
This is how my codes looks like:
Dim lastRow As String
lastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row + 1
Range("A" & lastRow).Select
Selection.PasteSpecial
Application.CutCopyMode = False
Range("U" & lastRow - 1).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.AutoFill Destination:=
Here I selected the cells with formulas which I want to fill and I am stucked at what destination should I use to fill only until the last used cell of A-T.
Many thanks,
David