Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88075

Autofill from last row to adjacent column's last row

$
0
0

I have three columns of data in an Excel sheet for which I add more rows of data each day. The aim is to copy the last row data of columns A and B until the last row of C, which is always some rows below. I managed to do part of that in the following code:

Range("A2").End(XlDirection.xlDown).Select
Selection.Resize(numRows + 1, numColumns + 2).AutoFill Destination:=Range("A11:B20"), Type:=xlFillCopy
Range("A11:B20").Select

The problem is with the range ("A11:B20"). I need it to be dynamic as the number of used rows will increase every day. Is there a way to make it dynamic?


Viewing all articles
Browse latest Browse all 88075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>