Have a worksheet with 1000+ rows with a pattern of text on first row and then have 3 blank rows. I need to copy the text from column B first row down through the next 3 rows. Then I need to designate those 3 rows as a group of the initial row. I have got the below code to work for the first two lines, but then it stops on line 3, I get a Compile error: Syntax error. I know from having recorded the initial macro from doing the steps that the beginning of line 3, Rows, is needed, but can't seem to find the right syntax to tell the system that the rows to be grouped are the next 3.
Edit: Added missing code sample.
Selection.AutoFill Destination:=Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(3, 0)), Type:=xlFillDefault
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(3, 0)).Select
Rows(ActiveCell.Row 1,ActiveCell.Row 3).Select
Range(ActiveCell.Offset(3, -1)).Activate
Selection.Rows.Group
Range(ActiveCell.Offset(4, 0)).Select
Second Edit: Added in recorded macro from doing the keystrokes to accomplish the grouping of the next 3 rows. Starting with having just copied the first row to the other 3 rows, the keystrokes were: 1 down, Shift/Space, Shift/2 down, Alt/dgg. Macro:
Rows("1037:1039").Select
Range("A1039").Activate
Selection.Rows.Group