0

I have 2 worksheets in the same workbook. I'm attempting to use a row count on the first page to generate similar row count for copy & paste in 2nd sheet. This is the lines I'm looking to adjust:

Selection.AutoFill Destination:=Range("A2:D329"), Type:=xlFillDefault
Range("A2:D329").Select
Uktena411
  • 1
  • 1
  • I'm basically looking to replace the 329 from the D, in sheet 2, with the lastrow count of sheet 1 – Uktena411 Jun 25 '21 at 18:49
  • Can you clarify what you mean with "generate a similar row count"? An Excel sheet has no inherent "row count", it just has data in certain rows. The scrollable area is automatically determined by the last filled row, and will be increased or decreased on demand. – LWChris Jun 25 '21 at 18:50
  • If you're wondering how to find out what the last row is, https://stackoverflow.com/q/71180/1843468 may help. – LWChris Jun 25 '21 at 18:53
  • 1
    Does this answer your question? [How can I find last row that contains data in a specific column?](https://stackoverflow.com/questions/71180/how-can-i-find-last-row-that-contains-data-in-a-specific-column) – braX Jun 25 '21 at 21:43
  • Thanks for the input, I was able to solve the issue with designating the Last ROW as a variable LR and then subbing last number with the new variable. basically: LR = Range("A" & Rows.Count).End(xlUp).Row – Uktena411 Jun 28 '21 at 20:35

0 Answers0