Baiano42
06-28-2019, 07:38 AM
Hey guys and gals,
I'm trying to create a macro that will do the following: select a range from B46 to E46, do the Ctrl+Shft+Down function, copy that selection, and paste it in a new work sheet. Here is how far I've gotten so far:
Sub DynamicRange()
'Best used when first column has value on last row and first row has a value in the last column
Dim sht As Worksheet
Dim LastRow As Long
Dim LastColumn As Long
Dim StartCell As Range
'Find Last Row and Column
LastRow = Cells(Rows.Count, StartCell.Column).End(xlUp).Row
LastColumn = Selection.Resize(Selection.Rows.Count + 5, _
Selection.Columns.Count).Select
'Select Range
Range(Range("B46"), Cells(LastRow, LastColumn)).Select
Any help with getting it to be completed would be amazing! Thanks all.
Cheers,
Baiano42
I'm trying to create a macro that will do the following: select a range from B46 to E46, do the Ctrl+Shft+Down function, copy that selection, and paste it in a new work sheet. Here is how far I've gotten so far:
Sub DynamicRange()
'Best used when first column has value on last row and first row has a value in the last column
Dim sht As Worksheet
Dim LastRow As Long
Dim LastColumn As Long
Dim StartCell As Range
'Find Last Row and Column
LastRow = Cells(Rows.Count, StartCell.Column).End(xlUp).Row
LastColumn = Selection.Resize(Selection.Rows.Count + 5, _
Selection.Columns.Count).Select
'Select Range
Range(Range("B46"), Cells(LastRow, LastColumn)).Select
Any help with getting it to be completed would be amazing! Thanks all.
Cheers,
Baiano42