Thread: [Solved] Select until last row
View Single Post
 
Old 08-12-2022, 01:28 AM
Marcia's Avatar
Marcia Marcia is offline Windows 10 Office 2019
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 553
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Select until last row

Hi. This code selects the range A5 to AQ50. I would like the code to select only the rows from A5 until the last row of a dynamic pivot table.
Code:
Dim lr As Long
    Range("A5:AQ5" & lr).Select
    Selection.Copy
What should the line be?
Thank you.
Reply With Quote