A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You can use the Group feature.
Activate the Data tab of the ribbon.
Select the rows of Task A to Task G.
In the Outline group, click Group.
Repeat for other sub-line groups.