Hi Rahim,
To expand and minimize the rows in Excel, you can use the
Group and Outline feature. Here are the steps:
- Select the rows that you want to group together.
- Go to the Data tab in the ribbon.
- Click on the Group button in the Outline section.
- The selected rows will now be grouped together, and a minus sign (-) will appear to the left of the group.
- Click on the minus sign to collapse the group and hide the rows.
- Click on the plus sign (+) to expand the group and show the rows again.
You can also use the keyboard shortcut
Alt + Shift + Right Arrow to group the selected rows, and
Alt + Shift + Left Arrow to ungroup them.
If you need to use any macro or Visual Basic code, wrap it in the
tags.