简体   繁体   中英

How to group the rows in excel using macros

This is what i need

在此处输入图片说明

i want to group the rows of above screen shot to below screen shot

在此处输入图片说明

Tried a lot using macro but not getting proper any one please help me out

Thanks in advance.

The simplest way to do this is with a pivot table. With a cell in your table selected, choose Pivot Table from the Insert tab. of the ribbon. Use the settings I show in this image. You can customize the pivot table to remove the Grand Total line.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM