this code will only copy the values in the function column without formatting
Sub duplicate_section()
acell = ActiveCell.Address
topcell = ActiveCell.End(xlUp).Address
rowa = Range(topcell).End(xlDown).End(xlDown).End(xlDown).Row
numofrows = Range(Range(topcell), Range(topcell).End(xlDown).End(xlDown)).Rows.Count
Rows(rowa & ":" & rowa + numofrows).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(Range(topcell), Range(topcell).End(xlDown).End(xlDown)).Copy
Range(topcell).End(xlDown).End(xlDown).Offset(2).Select
ActiveSheet.Paste
Range(acell).Select
End Sub
this code will copy the entire Option 2 below the original Option 2
Sub duplicate_section2()
acell = ActiveCell.Row
acella = ActiveCell.Address
bcell = Range("F" & acell).Address
topcell = Range(bcell).End(xlUp).Address
rowa = Range(topcell).End(xlDown).End(xlDown).End(xlDown).Row
numofrows = Range(Range(topcell), Range(topcell).End(xlDown).End(xlDown)).Rows.Count
Rows(rowa & ":" & rowa + numofrows).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(Range(topcell), Range(topcell).End(xlDown).End(xlDown)).EntireRow.Copy
Range(topcell).End(xlDown).End(xlDown).Offset(2).EntireRow.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range(acella).Select
End Sub
Bookmarks