Hello friends,
After searching all over the internet, I have a VBA code here which copies cell AG2 and pastes the data into the first empty cell in column AG. The same process repeats for cell AB2 for the second line.
Range("AG2").Copy Range("AG" & Rows.Count).End(xlUp).Offset(1, 0)
Range("AB2").Copy Range("AB" & Rows.Count).End(xlUp).Offset(1, 0)
My next step would be to auto fill column AG_ and AB_ based on the last cell row in other columns, let's say column A.
I have a code here
Range("AG10:AG10").AutoFill Destination:=Range("AB1:AG" & Cells(Rows.Count, "AA").End(xlUp).Row)
but with this code, I have to select a specific cell AG10 to start the autofill. This does not work as I have previously pasted my data into the first empty cell, which varies from week to week.
Hope that someone can help me out here, thank you!
After searching all over the internet, I have a VBA code here which copies cell AG2 and pastes the data into the first empty cell in column AG. The same process repeats for cell AB2 for the second line.
Range("AG2").Copy Range("AG" & Rows.Count).End(xlUp).Offset(1, 0)
Range("AB2").Copy Range("AB" & Rows.Count).End(xlUp).Offset(1, 0)
My next step would be to auto fill column AG_ and AB_ based on the last cell row in other columns, let's say column A.
I have a code here
Range("AG10:AG10").AutoFill Destination:=Range("AB1:AG" & Cells(Rows.Count, "AA").End(xlUp).Row)
but with this code, I have to select a specific cell AG10 to start the autofill. This does not work as I have previously pasted my data into the first empty cell, which varies from week to week.
Hope that someone can help me out here, thank you!