diygail123
New Member
- Joined
- Oct 24, 2018
- Messages
- 25
Hi
Can anyone help with the following code, I am trying to get the macro to group the rows from the end of a list of data in column A (the end will be different each time the macro is ran), down to row 858, which will stay the same each time. What do I replace A135 with to make the macro dynamic please?
Thanks
Gail
Can anyone help with the following code, I am trying to get the macro to group the rows from the end of a list of data in column A (the end will be different each time the macro is ran), down to row 858, which will stay the same each time. What do I replace A135 with to make the macro dynamic please?
Thanks
Gail
Code:
Sub grouprows()'
' grouprows Macro
'
Dim activecell As Range
Set activecell = activecell
Range("A7").Select
Selection.End(xlDown).Select
activecell.Offset(1, 0).Select
Range("[COLOR=#ff0000]A135[/COLOR]:A858").Select
Selection.Rows.Group
End Sub